Edit

Share via


GameObjectExtensions.ApplyToHierarchy Method

Definition

Apply the specified delegate to all objects in the hierarchy under a specified game object.

public:
[System::Runtime::CompilerServices::Extension]
 static void ApplyToHierarchy(UnityEngine::GameObject ^ root, Action<UnityEngine::GameObject ^> ^ action);
public static void ApplyToHierarchy (this UnityEngine.GameObject root, Action<UnityEngine.GameObject> action);
static member ApplyToHierarchy : UnityEngine.GameObject * Action<UnityEngine.GameObject> -> unit
<Extension()>
Public Sub ApplyToHierarchy (root As GameObject, action As Action(Of GameObject))

Parameters

root
UnityEngine.GameObject

Root game object of the hierarchy.

action
Action<UnityEngine.GameObject>

Delegate to apply.

Applies to