GameObjectExtensions.SetLayerInChildren

Extension Method in GameObjectExtensions

Declaration

public static void SetLayerInChildren(this GameObject parent, int layer)

Description

Sets the layer of the game object and all of its children.

Parameters

parentThe game object to set the layer of and its children.
layerThe layer to assign.

Overload

Declaration

public static void SetLayerInChildren(this GameObject parent, string layer)

Description

Sets the layer of the game object and all of its children.

Parameters

parentThe game object to set the layer of and its children.
layerThe layer to assign.