Method SetLayerRecursively
SetLayerRecursively(GameObject, int)
Sets the layer of this GameObject and all of its descendants.
Declaration
public static void SetLayerRecursively(this GameObject gameObject, int layer)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | gameObject | The GameObject at the root of the hierarchy to be modified. |
| int | layer | The layer to recursively assign GameObjects to. |