Description
The Flags
property of a GameObject
in the Sandbox framework represents various flags that can be set on the GameObject. These flags are used to control specific behaviors or states of the GameObject within the scene. The property is of type GameObjectFlags
, which is an enumeration that defines the possible flags that can be applied.
Usage
To use the Flags
property, you can get or set the flags on a GameObject
instance. This allows you to modify the behavior or state of the GameObject by applying different flags.
Example
// Example of setting flags on a GameObject
GameObject myObject = new GameObject();
myObject.Flags = GameObjectFlags.Static | GameObjectFlags.Visible;
// Example of checking a specific flag
bool isStatic = (myObject.Flags & GameObjectFlags.Static) != 0;