Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public sealed class PropertyRangeAttribute : Attribute, _Attribute
PropertyRange attribute creates a slider control to set the value of a property to between the specified range.
This is equivalent to Unity's Range attribute, but this attribute can be applied to both fields and property.
public PropertyRangeAttribute(double min, double max)
System.Double | min | The minimum value. |
System.Double | max | The maximum value. |
public PropertyRangeAttribute(double min, string maxGetter)
System.Double | min | The minimum value. |
System.String | maxGetter | A resolved string that should evaluate to a float value, and will be used as the max bounds. |
public PropertyRangeAttribute(string minGetter, double max)
System.String | minGetter | A resolved string that should evaluate to a float value, and will be used as the min bounds. |
System.Double | max | The maximum value. |
public PropertyRangeAttribute(string minGetter, string maxGetter)
System.String | minGetter | A resolved string that should evaluate to a float value, and will be used as the min bounds. |
System.String | maxGetter | A resolved string that should evaluate to a float value, and will be used as the max bounds. |
public double Max
public string MaxGetter
public double Min
public string MinGetter