GameObjectExtensions.SetLayerRecursively Method
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.
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. |
Set the layer to the given object and the full hierarchy below it.
public:
[System::Runtime::CompilerServices::Extension]
static void SetLayerRecursively(UnityEngine::GameObject ^ root, int layer);
public static void SetLayerRecursively (this UnityEngine.GameObject root, int layer);
static member SetLayerRecursively : UnityEngine.GameObject * int -> unit
<Extension()>
Public Sub SetLayerRecursively (root As GameObject, layer As Integer)
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 |
Set the layer to the given object and the full hierarchy below it and cache the previous layers in the out parameter.
public:
[System::Runtime::CompilerServices::Extension]
static void SetLayerRecursively(UnityEngine::GameObject ^ root, int layer, [Runtime::InteropServices::Out] System::Collections::Generic::Dictionary<UnityEngine::GameObject ^, int> ^ % cache);
public static void SetLayerRecursively (this UnityEngine.GameObject root, int layer, out System.Collections.Generic.Dictionary<UnityEngine.GameObject,int> cache);
static member SetLayerRecursively : UnityEngine.GameObject * int * Dictionary -> unit
<Extension()>
Public Sub SetLayerRecursively (root As GameObject, layer As Integer, ByRef cache As Dictionary(Of GameObject, Integer))
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 |