|
|
|
|
|
|
[Serializable] |
|
|
|
public abstract class Parameter |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Returns the display name of a parameter type
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="type">A subclass of Parameter</param>
|
|
|
|
/// <returns>The parameter type's display name</returns>
|
|
|
|
public static string GetDisplayName(Type type) |
|
|
|
{ |
|
|
|
return type.Name.Replace("Parameter", ""); |
|
|
|
} |
|
|
|
|
|
|
|
// /// <summary>
|
|
|
|
// /// The name of the parameter
|
|
|
|
// /// </summary>
|
|
|
|
// [HideInInspector] public string name = "Parameter";
|
|
|
|
//
|
|
|
|
// /// <summary>
|
|
|
|
// /// The target this parameter apply a sample to
|
|
|
|
// /// </summary>
|
|
|
|
// [HideInInspector, SerializeField] public ParameterTarget target = new ParameterTarget();
|
|
|
|
//
|
|
|
|
// /// <summary>
|
|
|
|
// /// Indicates whether this parameter has a target GameObject
|
|
|
|
// /// </summary>
|
|
|
|
// public bool hasTarget => target.gameObject != null;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The sample type generated by this parameter
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
protected Parameter() |
|
|
|
{ |
|
|
|
InitializeSamplers(); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the display name of a parameter type
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="type">A subclass of Parameter</param>
|
|
|
|
/// <returns>The parameter type's display name</returns>
|
|
|
|
public static string GetDisplayName(Type type) |
|
|
|
{ |
|
|
|
return type.Name.Replace("Parameter", ""); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|