docs.unity.cn
    Show / Hide Table of Contents

    Class ConstraintsUtils

    Utility functions for constraints.

    Inheritance
    Object
    ConstraintsUtils
    Namespace: UnityEngine.Animations.Rigging
    Syntax
    public static class ConstraintsUtils : object

    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
    Single[]

    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
    Single[]

    An array of interpolants.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Tuesday, August 24, 2021