TransformExtensions.EnumerateAncestors(Transform, Boolean) Method

Definition

Enumerates the ancestors of the specified transform.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<UnityEngine::Transform ^> ^ EnumerateAncestors(UnityEngine::Transform ^ startTransform, bool includeSelf);
public static System.Collections.Generic.IEnumerable<UnityEngine.Transform> EnumerateAncestors (this UnityEngine.Transform startTransform, bool includeSelf);
static member EnumerateAncestors : UnityEngine.Transform * bool -> seq<UnityEngine.Transform>
<Extension()>
Public Iterator Function EnumerateAncestors (startTransform As Transform, includeSelf As Boolean) As IEnumerable(Of Transform)

Parameters

startTransform
UnityEngine.Transform

Transform for which ancestors must be returned.

includeSelf
Boolean

Indicates whether the specified transform should be included.

Returns

IEnumerable<UnityEngine.Transform>

An enumeration of all ancestor transforms of the specified start transform.

Applies to