GameObjectExtensions.SetLayerInChildren

Extension Method in GameObjectExtensions

Declaration

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

Description

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

Parameters

parentThe parent 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 parent game object and all of its children.

Parameters

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