Method SetLayerAndAddToHideFlagsRecursively
SetLayerAndAddToHideFlagsRecursively(GameObject, int, HideFlags)
Sets the layer of this GameObject and adds to its HideFlags, and does the same for all of its descendants.
Declaration
public static void SetLayerAndAddToHideFlagsRecursively(this GameObject gameObject, int layer, HideFlags hideFlags)
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. |
| HideFlags | hideFlags | Should the GameObjects be hidden, saved with the scene, or modifiable by the user? |
Remarks
This function combines the hideFlags with the existing flags of a GameObject.