TransformExtensions.IsParentOrChildOf(Transform, Transform) Method

Definition

Checks if the provided transforms are child/parent related.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static bool IsParentOrChildOf(UnityEngine::Transform ^ transform1, UnityEngine::Transform ^ transform2);

Parameters

transform1
UnityEngine.Transform
transform2
UnityEngine.Transform

Returns

True if either transform is the parent of the other or if they are the same

Applies to

Produit Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0