void Save( bool saveAs )

book_4_sparkGenerated
code_blocksInput

Description

The Save method in the Editor.SceneEditorSession class is responsible for saving the current state of the scene being edited. This method can be invoked to either save the scene in its current state or prompt the user to save it under a new name, depending on the parameter provided.

Usage

To use the Save method, call it on an instance of SceneEditorSession. Pass a boolean value to the saveAs parameter to determine the save behavior:

  • Pass true to prompt the user to save the scene under a new name.
  • Pass false to save the scene in its current state without prompting for a new name.

Example

// Example of using the Save method
Editor.SceneEditorSession session = Editor.SceneEditorSession.Active;

// Save the current scene state
session.Save(false);

// Prompt to save the scene under a new name
session.Save(true);