![]() |
Infohazard.Core 1.4.1
Infohazard Core Utility Library
|
Provides some methods to navigate to scenes. More...
Public Member Functions | |
void | QuitButton () |
Non-static equivalent of Quit. More... | |
void | ReloadScene () |
Reload the current scene. More... | |
void | LoadScene (string sceneName) |
Load a scene with a given name. More... | |
Static Public Member Functions | |
static void | Quit () |
If in the editor, exit play mode. Otherwise, close the application. More... | |
Provides some methods to navigate to scenes.
Also provides a static method to quit the game that works in a standalone build as well as in the editor. This script is useful if you’re building a super quick main menu (such as in the last half hour of a game jam) and need to hook up your buttons as fast as possible.
void Infohazard.Core.SceneControl.LoadScene | ( | string | sceneName | ) |
Load a scene with a given name.
Scene will be loaded as a single (not additively).
sceneName | The scene name to load. |
|
static |
If in the editor, exit play mode. Otherwise, close the application.
void Infohazard.Core.SceneControl.QuitButton | ( | ) |
Non-static equivalent of Quit.
void Infohazard.Core.SceneControl.ReloadScene | ( | ) |
Reload the current scene.
Current scene is determined by SceneManager.GetActiveScene()
, and is loaded as a single scene. This method is not very helpful if your game has multiple scenes open at a time.