The Flags
property of a GameObject
in the Sandbox framework represents various state flags that can be associated with the GameObject
. These flags are used to define specific behaviors or characteristics of the GameObject
within the scene.
The Flags
property of a GameObject
in the Sandbox framework represents various state flags that can be associated with the GameObject
. These flags are used to define specific behaviors or characteristics of the GameObject
within the scene.
Use the Flags
property to get or set the state flags of a GameObject
. This property is useful for managing and querying the state of a GameObject
in a more granular way.
// Example of setting and getting the Flags property of a GameObject // Assume 'gameObject' is an instance of GameObject Sandbox.GameObject gameObject = new Sandbox.GameObject(); // Set flags gameObject.Flags = Sandbox.GameObjectFlags.SomeFlag; // Get flags Sandbox.GameObjectFlags currentFlags = gameObject.Flags; // Check if a specific flag is set bool isFlagSet = (currentFlags & Sandbox.GameObjectFlags.SomeFlag) != 0;