docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ConstraintsUtils

    Utility functions for constraints.

    Inheritance
    object
    ConstraintsUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Animations.Rigging
    Assembly: Unity.Animation.Rigging.dll
    Syntax
    public static class ConstraintsUtils

    Methods

    ConstructConstraintDataPropertyName(string)

    Prepends RigConstraint data property to specified property name.

    Declaration
    public static string ConstructConstraintDataPropertyName(string property)
    Parameters
    Type Name Description
    string property

    Property name.

    Returns
    Type Description
    string

    Return a complete property name.

    ConstructCustomPropertyName(Component, string)

    Builds a unique property name for a custom property.

    Declaration
    public static string ConstructCustomPropertyName(Component component, string property)
    Parameters
    Type Name Description
    Component component

    Associated component.

    string property

    Property name.

    Returns
    Type Description
    string

    Returns a custom property name.

    ExtractChain(Transform, Transform)

    Creates a list of Transforms all parented to one another in between two GameObjects.

    Declaration
    public static Transform[] ExtractChain(Transform root, Transform tip)
    Parameters
    Type Name Description
    Transform root

    The root Transform.

    Transform tip

    The tip Transform.

    Returns
    Type Description
    Transform[]

    ExtractLengths(Transform[])

    Calculates the distances in between every Transforms in the specified Transform chain.

    Declaration
    public static float[] ExtractLengths(Transform[] chain)
    Parameters
    Type Name Description
    Transform[] chain

    The Transform chain.

    Returns
    Type Description
    float[]

    An array of distances.

    ExtractSteps(Transform[])

    Calculates the interpolant values for each Transform using distance as a measure such that first Transform is at 0 and last Transform is at 1.

    Declaration
    public static float[] ExtractSteps(Transform[] chain)
    Parameters
    Type Name Description
    Transform[] chain

    The Transform chain.

    Returns
    Type Description
    float[]

    An array of interpolants.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)