class in UnityEditor.SceneManagement
/
Inherits from:SceneManagement.SceneManager
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseScene management in the Editor.
DefaultSceneCullingMask | Use SceneCullingMasks.DefaultSceneCullingMask instead. |
playModeStartScene | Loads this SceneAsset when you start Play Mode. |
preventCrossSceneReferences | Controls whether cross-Scene references are allowed in the Editor. |
previewSceneCount | The current amount of active preview Scenes. |
CalculateAvailableSceneCullingMask | Go through all Scenes and find the smallest unused bit in the unition of all Scene culling masks. |
ClosePreviewScene | Closes a preview Scene created by NewPreviewScene or OpenPreviewScene. |
CloseScene | Close the Scene. If removeScene flag is true, the closed Scene will also be removed from EditorSceneManager. |
DetectCrossSceneReferences | Detects cross-Scene references in a Scene. |
EnsureUntitledSceneHasBeenSaved | Shows a save dialog if an Untitled Scene exists in the current Scene manager setup. |
GetSceneCullingMask | Return the culling mask set on the given Scene. |
GetSceneManagerSetup | Returns the current setup of the SceneManager. |
IsPreviewScene | Is the Scene a preview Scene? |
IsPreviewSceneObject | Is this object part of a preview Scene? |
LoadSceneAsyncInPlayMode | This method allows you to load a Scene during playmode in the editor, without requiring the Scene to be included in the Build Settings Scene list. |
LoadSceneInPlayMode | This method allows you to load a Scene during playmode in the editor, without requiring the Scene to be included in the Build Settings Scene list. |
MarkAllScenesDirty | Mark all the loaded Scenes as modified. |
MarkSceneDirty | Mark the specified Scene as modified. |
MoveSceneAfter | Allows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes after the destination Scene. |
MoveSceneBefore | Allows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes before the destination Scene. |
NewPreviewScene | Creates a new preview Scene. Any object added to a preview Scene will only be rendered in that Scene. |
NewScene | Create a new Scene. |
OpenPreviewScene | Opens a Scene Asset in a preview Scene. |
OpenScene | Open a Scene in the Editor. |
RestoreSceneManagerSetup | Restore the setup of the SceneManager. |
SaveCurrentModifiedScenesIfUserWantsTo | Asks the user if they want to save the current open modified Scene or Scenes in the Hierarchy. |
SaveModifiedScenesIfUserWantsTo | Asks whether the modfied input Scenes should be saved. |
SaveOpenScenes | Save all open Scenes. |
SaveScene | Save a Scene. |
SaveScenes | Save a list of Scenes. |
SetSceneCullingMask | Set the culling mask on this scene to this value. Cameras will only render objects in Scenes that have the same bits set in their culling mask. |
activeSceneChangedInEditMode | Subscribe to this event to get notified when the active Scene has changed in Edit mode in the Editor. |
newSceneCreated | This event is called after a new Scene has been created. |
sceneClosed | This event is called after a Scene has been closed in the editor. |
sceneClosing | This event is called before closing an open Scene after you have requested that the Scene is closed. |
sceneDirtied | This event is called after a Scene has been modified in the editor. |
sceneManagerSetupRestored | This can be useful to get notified when the SceneManager's scenes are replaced with a set of new scenes from calls to RestoreSceneManagerSetup.Use the scenes argument to check what scenes has just been opened.Additional resources: SceneManagerSetupRestoredCallback. |
sceneOpened | This event is called after a Scene has been opened in the editor. |
sceneOpening | This event is called before opening an existing Scene. |
sceneSaved | This event is called after a Scene has been saved. |
sceneSaving | This event is called before a Scene is saved disk after you have requested the Scene to be saved. |
NewSceneCreatedCallback | Callbacks of this type which have been added to the newSceneCreated event are called after a new Scene has been created. |
SceneClosedCallback | Callbacks of this type which have been added to the sceneClosed event are called immediately after the Scene has been closed. |
SceneClosingCallback | Callbacks of this type which have been added to the sceneClosing event are called just before a Scene is closed. |
SceneDirtiedCallback | Callbacks of this type which have been added to the sceneDirtied event are called after a Scene changes from being unmodified to being modified. |
SceneManagerSetupRestoredCallback | Callbacks of this type which have been added to the sceneManagerSetupRestored event are called after RestoreSceneManagerSetup has been called. |
SceneOpenedCallback | Callbacks of this type which have been added to the sceneOpened event are called after a Scene has been opened. |
SceneOpeningCallback | Callbacks of this type which have been added to the sceneOpening event are called just before opening a Scene. |
SceneSavedCallback | Callbacks of this type which have been added to the sceneSaved event are called after a Scene has been saved. |
SceneSavingCallback | Callbacks of this type which have been added to the sceneSaving event are called just before the Scene is saved. |
loadedSceneCount | The number of loaded Scenes. |
sceneCount | The current number of Scenes. |
sceneCountInBuildSettings | Number of Scenes in Build Settings. |
CreateScene | Create an empty new Scene at runtime with the given name. |
GetActiveScene | Gets the currently active Scene. |
GetSceneAt | Get the Scene at index in the SceneManager's list of loaded Scenes. |
GetSceneByBuildIndex | Get a Scene struct from a build index. |
GetSceneByName | Searches through the Scenes loaded for a Scene with the given name. |
GetSceneByPath | Searches all Scenes loaded for a Scene that has the given asset path. |
LoadScene | Loads the Scene by its name or index in Build Settings. |
LoadSceneAsync | Loads the Scene asynchronously in the background. |
MergeScenes | This will merge the source Scene into the destinationScene. |
MoveGameObjectsToScene | Move multiple GameObjects, represented by a NativeArray of instance IDs, from their current Scene to a new Scene. |
MoveGameObjectToScene | Move a GameObject from its current Scene to a new Scene. |
SetActiveScene | Set the Scene to be active. |
UnloadSceneAsync | Destroys all GameObjects associated with the given Scene and removes the Scene from the SceneManager. |
activeSceneChanged | Subscribe to this event to get notified when the active Scene has changed. |
sceneLoaded | Assign a custom callback to this event to get notifications when a Scene has loaded. |
sceneUnloaded | Add a delegate to this to get notifications when a Scene has unloaded. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.