TransformExtensions.GetDepth(Transform) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.