Description
The GameObjectFlags.NotSaved
field is a member of the GameObjectFlags
enumeration in the Sandbox namespace. This flag indicates that the associated game object should not be saved to disk or included when duplicating objects. It is useful for temporary objects or those that should not persist between sessions or be copied.
Usage
Use the NotSaved
flag when you want to ensure that a game object is not serialized to disk or included in duplication operations. This can be particularly useful for objects that are meant to be temporary or are dynamically generated and should not be part of the saved game state.
Example
// Example of using GameObjectFlags.NotSaved
GameObject myObject = new GameObject();
myObject.Flags |= GameObjectFlags.NotSaved;
// This object will not be saved to disk or duplicated
// when the scene is saved or copied.