SceneManager Class - NocturnalWisp/Tynted-Engine GitHub Wiki
Usage
Controls various scene management functions.
Load Scene
Summary
Loads a scene from a file to be handled by the game.
Implementation
SceneManager.LoadScene(Scene scene)
Vars
- scene - the scene to load.
Load Scene On Top
Summary
Loads a scene without closing all other scenes.
Implementation
SceneManager.LoadSceneOnTop(Scene scene)
Vars
- scene - the scene to load.
Unload Scene (by name)
Summary
Unloads the scene handled by the game.
Implementation
SceneManager.UnloadScene(string sceneName)
Vars
- sceneName - The name of the scene to find and unload.
Unload Scene (by object)
Summary
Unloads the scene by the object reference.
Implementation
SceneManager.UnloadScene(Scene scene)
Vars
- scene - The scene to load.
Unload All Scenes
Summary
Unloads all the currently loaded scenes.
Implementation
SceneManager.UnloadAllScenes()
Vars
- closing - Defines if you are closing the whole game.
Pause Scene (by name)
Summary
Pauses a scene that has been loaded by the game.
Implementation
SceneManager.PauseScene(string sceneName)
Vars
- sceneName - The name of the scene to find.
Pause Scene (by object)
Summary
Pauses the scene by the object reference.
Implementation
SceneManager.PauseScene(Scene scene)
Vars
- scene - The scene to pause.
Resume Scene (by name)
Summary
Resumes a scene that has been loaded by the game.
Implementation
SceneManager.ResumeScene(string sceneName)
Vars
- sceneName - The name of the scene to find.
Resume Scene (by object)
Summary
Resumes the scene by the object reference.
Implementation
SceneManager.ResumeScene(Scene scene)
Vars
- scene - The scene to resume.
Scene Exists
Summary
Returns whether the scene has been loaded or not.
Implementation
SceneManager.SceneExists(string sceneName)
Vars
- sceneName - The name of the scene to check.
Returns
- Boolean - Whether the scene has been loaded or not.
Get Scene By Name
Summary
Returns a scene if found by the name given.
Implementation
SceneManager.GetSceneByName(string sceneName)
Vars
- sceneName - Name of the scene to find.
Returns
- Scene - The resulting scene if found.