Description
The Hidden
field is a member of the GameObjectFlags
enumeration in the Sandbox API. It is used to mark a game object as hidden in the hierarchy or inspector. This flag can be useful for managing the visibility of objects within the editor, allowing developers to hide certain objects from view without affecting their functionality in the game.
Usage
To use the Hidden
flag, you can set it on a GameObject
to ensure it is not visible in the hierarchy or inspector. This is particularly useful for objects that should not be modified or viewed during development but still need to exist in the scene.
Example
// Example of using the Hidden flag
GameObject myObject = new GameObject();
myObject.Flags |= GameObjectFlags.Hidden;
// This will hide 'myObject' in the hierarchy and inspector.