Select your preferred scripting language. All code snippets will be displayed in this language.
class in UnityEngine.SceneManagement
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 at run-time.
sceneCount | The total number of currently loaded 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 added scenes. |
GetSceneByBuildIndex | Get a scene struct from a build index. |
GetSceneByName | Searches through the scenes added to the SceneManager for a scene with the given name. |
GetSceneByPath | Searches all scenes added to the SceneManager 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. |
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 | Add a delegate to this to get notifications when the active scene has changed |
sceneLoaded | Add a delegate to this to get notifications when a scene has loaded |
sceneUnloaded | Add a delegate to this to get notifications when a scene has unloaded |