編集

次の方法で共有


TransformExtensions.IsParentOrChildOf(Transform, Transform) Method

Definition

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

Applies to