TransformExtensions.IsParentOrChildOf(Transform, 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.
Checks if the provided transforms are child/parent related.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsParentOrChildOf(UnityEngine::Transform ^ transform1, UnityEngine::Transform ^ transform2);
public static bool IsParentOrChildOf (this UnityEngine.Transform transform1, UnityEngine.Transform transform2);
static member IsParentOrChildOf : UnityEngine.Transform * UnityEngine.Transform -> bool
<Extension()>
Public Function IsParentOrChildOf (transform1 As Transform, transform2 As Transform) As Boolean
Parameters
- transform1
- UnityEngine.Transform
- transform2
- UnityEngine.Transform
Returns
True if either transform is the parent of the other or if they are the same