docs.unity.cn
    Show / Hide Table of Contents

    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).

    Inheritance
    Object
    WeightRangeAttribute
    Namespace: UnityEngine.Animations.Rigging
    Syntax
    public sealed class WeightRangeAttribute : PropertyAttribute

    Constructors

    WeightRangeAttribute(Single, Single)

    Constructs a new WeightRangeAttribute instance with the specified range. A value of 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
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Tuesday, August 24, 2021