EditorApplication.SaveScenestatic function SaveScene (path : String = "", saveAsCopy : boolean = false) : booleanParameters
Returnsboolean - True if the save succeeded, otherwise false. DescriptionSave the open scene. All paths are relative to the project folder, such as: "Assets/MyScenes/MyScene.unity". Folders specified in the path must already exist before calling the function. If no path is specified, the path of the current open scene is used, except if it was never saved before, in which case a save dialog is shown. The function returns false if the save failed. This can happen if the specified path is invalid or if the user cancels in the case of a save dialog. When calling the function, the unsaved changes marker is cleared, just as when saving using the file menu. (On Windows, the unsaved changes marker is an asterix after the file name in the window title. On Mac OS X it's a dot inside the red close button of the window.) When a path is specified, the currentScene is also changed to be the specified asset. When saveAsCopy is set to true however, neither the currentScene or the unsaved changes marker is changed. See Also: currentScene.
// Simple editor window that autosaves the working scene
|

