GameObjectExtensions.SetLayerRecursively Method

Definition

Overloads

SetLayerRecursively(GameObject, Int32)

Set the layer to the given object and the full hierarchy below it.

SetLayerRecursively(GameObject, Int32, Dictionary<GameObject,Int32>)

Set the layer to the given object and the full hierarchy below it and cache the previous layers in the out parameter.

SetLayerRecursively(GameObject, Int32)

Set the layer to the given object and the full hierarchy below it.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static void SetLayerRecursively(UnityEngine::GameObject ^ root, int layer);

Parameters

root
UnityEngine.GameObject

Start point of the traverse

layer
Int32

The layer to apply

Applies to

MRTK2 Unity 2018 2.7.0 und andere Versionen
Produkt Versionen
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

SetLayerRecursively(GameObject, Int32, Dictionary<GameObject,Int32>)

Set the layer to the given object and the full hierarchy below it and cache the previous layers in the out parameter.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static void SetLayerRecursively(UnityEngine::GameObject ^ root, int layer, [Runtime::InteropServices::Out] System::Collections::Generic::Dictionary<UnityEngine::GameObject ^, int> ^ % cache);

Parameters

root
UnityEngine.GameObject

Start point of the traverse

layer
Int32

The layer to apply

cache
Dictionary<UnityEngine.GameObject,Int32>

The previously set layer for each object

Applies to

MRTK2 Unity 2018 2.7.0 und andere Versionen
Produkt Versionen
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