Class WeightRangeAttribute
By default, weight appears as a numeric input field in the Inspector. Decorate WeightedTransform or WeightedTransformArray fields with this attribute to make it display using a slider with the specified range. See also OnValidate(ref WeightedTransformArray, Single, Single).
Inherited Members
Namespace: UnityEngine.Animations.Rigging
Syntax
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public sealed class WeightRangeAttribute : PropertyAttribute, _Attribute
Constructors
WeightRangeAttribute(Single, Single)
Constructs a new WeightRangeAttribute instance with the specified range. A value of NaN for either end of the range will permit any value to be entered.
Declaration
public WeightRangeAttribute(float min, float max)
Parameters
Type | Name | Description |
---|---|---|
Single | min | The smallest permissible value the weight may have. |
Single | max | The largest permissible value the weight may have. |
Fields
max
The largest permissible value the weight may have.
Declaration
public readonly float max
Field Value
Type | Description |
---|---|
Single |
min
The smallest permissible value the weight may have.
Declaration
public readonly float min
Field Value
Type | Description |
---|---|
Single |