GameObjectFlags Flags { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Flags property of a GameObject in the Sandbox framework represents various state flags associated with the GameObject. These flags can be used to determine or modify the behavior of the GameObject within the scene.

Usage

Use the Flags property to get or set the state flags of a GameObject. This property is useful for managing the internal state and behavior of the GameObject in a more granular way.

Example

// Example of accessing and modifying the Flags property of a GameObject
GameObject myObject = new GameObject();

// Access the current flags
GameObjectFlags currentFlags = myObject.Flags;

// Modify the flags
myObject.Flags |= GameObjectFlags.SomeFlag;

// Check if a specific flag is set
bool isFlagSet = (myObject.Flags & GameObjectFlags.SomeFlag) != 0;