Infohazard.Core 1.4.1
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.SceneControl Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

◆ LoadScene()

void Infohazard.Core.SceneControl.LoadScene ( string  sceneName)

Load a scene with a given name.

Scene will be loaded as a single (not additively).

Parameters
sceneNameThe scene name to load.

◆ Quit()

static void Infohazard.Core.SceneControl.Quit ( )
static

If in the editor, exit play mode. Otherwise, close the application.

◆ QuitButton()

void Infohazard.Core.SceneControl.QuitButton ( )

Non-static equivalent of Quit.

◆ ReloadScene()

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.


The documentation for this class was generated from the following file: