docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class IKUtility

    General utilities for 2D IK.

    Inheritance
    object
    IKUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.U2D.IK
    Assembly: Unity.2D.IK.Runtime.dll
    Syntax
    [MovedFrom("UnityEngine.Experimental.U2D.IK")]
    public class IKUtility

    Methods

    GetAncestorCount(Transform)

    Gets the depth of the transform's hierarchy.

    Declaration
    public static int GetAncestorCount(Transform transform)
    Parameters
    Type Name Description
    Transform transform

    Transform to check.

    Returns
    Type Description
    int

    Integer value for hierarchy depth.

    GetMaxChainCount(IKChain2D)

    Gets the maximum chain count for a IKChain2D.

    Declaration
    public static int GetMaxChainCount(IKChain2D chain)
    Parameters
    Type Name Description
    IKChain2D chain

    IKChain2D to query.

    Returns
    Type Description
    int

    Integer value for the maximum chain count.

    IsDescendentOf(Transform, Transform)

    Check if a transform is a descendent of another transform.

    Declaration
    public static bool IsDescendentOf(Transform transform, Transform ancestor)
    Parameters
    Type Name Description
    Transform transform

    Transforms to check.

    Transform ancestor

    Transform's ancestor.

    Returns
    Type Description
    bool

    Returns true if the transform is a descendent. False otherwise.

    In This Article
    Back to top
    Copyright © 2024 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)