robot_2Generated
code_blocksInput

Description

The NotSaved field is a member of the GameObjectFlags enumeration in the Sandbox API. It is used to indicate that a game object should not be saved to disk or duplicated. This flag is particularly useful when you want to create temporary objects that should not persist between sessions or be copied when duplicating objects.

Usage

To use the NotSaved flag, you can assign it to a game object to ensure that it is not saved or duplicated. This is typically done by setting the flag on the game object's properties or during its initialization.

Example

// Example of using the NotSaved flag
GameObject myObject = new GameObject();
myObject.Flags |= GameObjectFlags.NotSaved;

// This object will not be saved to disk or duplicated
// when using the NotSaved flag.