v3.6.1 Documentation
Fungus.SceneLoader Class Reference

Helper component for loading a new scene. More...

Inheritance diagram for Fungus.SceneLoader:

Static Public Member Functions

static void LoadScene (string _sceneToLoad, Texture2D _loadingTexture)
 Asynchronously load a new scene. More...
 

Protected Member Functions

virtual void Start ()
 
virtual IEnumerator DoLoadBlock ()
 
virtual void OnGUI ()
 

Protected Attributes

Texture2D loadingTexture
 
string sceneToLoad
 
bool displayedImage
 

Detailed Description

Helper component for loading a new scene.

A fullscreen loading image is displayed while loading the new scene. All Rooms are destroyed and unused assets are released from memory before loading the new scene to minimize memory footprint. For streaming Web Player builds, the loading image will be displayed until the requested level has finished downloading.

Definition at line 19 of file SceneLoader.cs.

Member Function Documentation

◆ DoLoadBlock()

virtual IEnumerator Fungus.SceneLoader.DoLoadBlock ( )
protectedvirtual

Definition at line 30 of file SceneLoader.cs.

◆ LoadScene()

static void Fungus.SceneLoader.LoadScene ( string  _sceneToLoad,
Texture2D  _loadingTexture 
)
static

Asynchronously load a new scene.

Parameters
_sceneToLoadThe name of the scene to load. Scenes must be added in project build settings.
_loadingTextureLoading image to display while loading the new scene.

Definition at line 100 of file SceneLoader.cs.

◆ OnGUI()

virtual void Fungus.SceneLoader.OnGUI ( )
protectedvirtual

Definition at line 67 of file SceneLoader.cs.

◆ Start()

virtual void Fungus.SceneLoader.Start ( )
protectedvirtual

Definition at line 25 of file SceneLoader.cs.

Member Data Documentation

◆ displayedImage

bool Fungus.SceneLoader.displayedImage
protected

Definition at line 23 of file SceneLoader.cs.

◆ loadingTexture

Texture2D Fungus.SceneLoader.loadingTexture
protected

Definition at line 21 of file SceneLoader.cs.

◆ sceneToLoad

string Fungus.SceneLoader.sceneToLoad
protected

Definition at line 22 of file SceneLoader.cs.


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