Click or drag to resize

GameObjectExtensionsSetLayerRecursive Method

Sets the layer for a GameObject and all it's children

Namespace:  ImmerseSDK.Extensions
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.5.0.0 (3.5.0.0)
Syntax
C#
public static void SetLayerRecursive(
	this UnityEngine.GameObject gameObject,
	int layer
)

Parameters

gameObject
Type: UnityEngine.GameObject
Target parent GameObject
layer
Type: SystemInt32
Layer to set

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type UnityEngine.GameObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also