Method GetAncestorCount
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. |