Class IKUtility
General utilities for 2D IK.
Inherited Members
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. |