Extensions.SetLayerRecursively

Extension Method in Extensions

Declaration

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

Description

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

Parameters

parentThe parent game object to recursively traverse through.
layerThe layer to set.