Struct WeightedTransform | Animation Rigging | 1.0.3
docs.unity3d.com
    Show / Hide Table of Contents

    Struct WeightedTransform

    Tuple of a Reference to a Transform component and a weight number.

    Namespace: UnityEngine.Animations.Rigging
    Syntax
    [Serializable]
    public struct WeightedTransform : ITransformProvider, IWeightProvider, IEquatable<WeightedTransform>

    Constructors

    WeightedTransform(Transform, Single)

    Constructor.

    Declaration
    public WeightedTransform(Transform transform, float weight)
    Parameters
    Type Name Description
    Transform transform

    Reference to a Transform component.

    Single weight

    Weight. This is a number in between 0 and 1.

    Fields

    transform

    Reference to a Transform component.

    Declaration
    public Transform transform
    Field Value
    Type Description
    Transform

    weight

    Weight. This is a number be in between 0 and 1.

    Declaration
    public float weight
    Field Value
    Type Description
    Single

    Methods

    Default(Single)

    Returns a WeightedTransform object with an null Transform component reference and the specified weight.

    Declaration
    public static WeightedTransform Default(float weight)
    Parameters
    Type Name Description
    Single weight

    Weight. This is a number in between 0 and 1.

    Returns
    Type Description
    WeightedTransform

    Returns a new WeightedTransform

    Equals(WeightedTransform)

    Compare two WeightedTransform objects for equality.

    Declaration
    public bool Equals(WeightedTransform other)
    Parameters
    Type Name Description
    WeightedTransform other

    A WeightedTransform object

    Returns
    Type Description
    Boolean

    Returns true if both WeightedTransform have the same values. False otherwise.

    Explicit Interface Implementations

    ITransformProvider.transform

    Reference to a Transform component.

    Declaration
    Transform ITransformProvider.transform { get; set; }
    Returns
    Type Description
    Transform
    Implements
    ITransformProvider.transform

    IWeightProvider.weight

    Weight. This is a number in between 0 and 1.

    Declaration
    float IWeightProvider.weight { get; set; }
    Returns
    Type Description
    Single
    Implements
    IWeightProvider.weight
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023