Class IKUtility
General utilities for 2D IK.
Namespace: UnityEngine.U2D.IK
Syntax
public class IKUtility : object
Methods
GetAncestorCount(Transform)
Gets the hierarchy depth of a Unity Transform.
Declaration
public static int GetAncestorCount(Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | Unity Transform to check. |
Returns
Type | Description |
---|---|
Int32 | 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 |
---|---|
Int32 | Integer value for the maximum chain count. |
IsDescendentOf(Transform, Transform)
Check if a Unity Transform is a descendent of another Unity Transform.
Declaration
public static bool IsDescendentOf(Transform transform, Transform ancestor)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | Unity Transform to check. |
Transform | ancestor | Unity Transform ancestor. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the Unity Transform is a descendent. False otherwise. |