TransformExtensions.GetDepth(Transform) Method

Definition

Gets the hierarchical depth of the Transform from its root. Returns -1 if the transform is the root.

public:
[System::Runtime::CompilerServices::Extension]
 static int GetDepth(UnityEngine::Transform ^ t);
public static int GetDepth (this UnityEngine.Transform t);
static member GetDepth : UnityEngine.Transform -> int
<Extension()>
Public Function GetDepth (t As Transform) As Integer

Parameters

t
UnityEngine.Transform

The transform to get the depth for.

Returns

Applies to