Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMSceneLoadingManager Class Reference

A class to load scenes using a loading screen instead of just the default API This class used to be known as LoadingSceneManager, and has now been renamed to MMSceneLoadingManager for consistency More...

Inheritance diagram for MoreMountains.Tools.MMSceneLoadingManager:

Classes

struct  LoadingSceneEvent
 

Public Types

enum  LoadingStatus {
  LoadingStatus.LoadStarted, LoadingStatus.BeforeEntryFade, LoadingStatus.EntryFade, LoadingStatus.AfterEntryFade,
  LoadingStatus.UnloadOriginScene, LoadingStatus.LoadDestinationScene, LoadingStatus.LoadProgressComplete, LoadingStatus.InterpolatedLoadProgressComplete,
  LoadingStatus.BeforeExitFade, LoadingStatus.ExitFade, LoadingStatus.DestinationSceneActivation, LoadingStatus.UnloadSceneLoader,
  LoadingStatus.LoadTransitionComplete
}
 

Static Public Member Functions

static void LoadScene (string sceneToLoad)
 Call this static method to load a scene from anywhere More...
 
static void LoadScene (string sceneToLoad, string loadingSceneName)
 Call this static method to load a scene from anywhere More...
 

Public Attributes

Text LoadingText
 the text object where you want the loading message to be displayed More...
 
CanvasGroup LoadingProgressBar
 the canvas group containing the progress bar More...
 
CanvasGroup LoadingAnimation
 the canvas group containing the animation More...
 
CanvasGroup LoadingCompleteAnimation
 the canvas group containing the animation to play when loading is complete More...
 
float StartFadeDuration =0.2f
 the duration (in seconds) of the initial fade in More...
 
float ProgressBarSpeed =2f
 the speed of the progress bar More...
 
float ExitFadeDuration =0.2f
 the duration (in seconds) of the load complete fade out More...
 
float LoadCompleteDelay =0.5f
 the delay (in seconds) before leaving the scene when complete More...
 

Static Public Attributes

static string LoadingScreenSceneName ="LoadingScreen"
 The name of the scene to load while the actual target scene is loading (usually a loading screen) More...
 

Protected Member Functions

virtual void Start ()
 On Start(), we start loading the new level asynchronously More...
 
virtual void Update ()
 Every frame, we fill the bar smoothly according to loading progress More...
 
virtual IEnumerator LoadAsynchronously ()
 Loads the scene to load asynchronously. More...
 
virtual void LoadingSetup ()
 Sets up all visual elements, fades from black at the start More...
 
virtual void LoadingComplete ()
 Triggered when the actual loading is done, replaces the progress bar with the complete animation More...
 

Protected Attributes

AsyncOperation _asyncOperation
 
float _fadeDuration = 0.5f
 
float _fillTarget =0f
 
string _loadingTextValue
 
Image _progressBarImage
 

Static Protected Attributes

static string _sceneToLoad = ""
 
static MMTweenType _tween
 

Detailed Description

A class to load scenes using a loading screen instead of just the default API This class used to be known as LoadingSceneManager, and has now been renamed to MMSceneLoadingManager for consistency

Member Enumeration Documentation

◆ LoadingStatus

Enumerator
LoadStarted 
BeforeEntryFade 
EntryFade 
AfterEntryFade 
UnloadOriginScene 
LoadDestinationScene 
LoadProgressComplete 
InterpolatedLoadProgressComplete 
BeforeExitFade 
ExitFade 
DestinationSceneActivation 
UnloadSceneLoader 
LoadTransitionComplete 

Member Function Documentation

◆ LoadAsynchronously()

virtual IEnumerator MoreMountains.Tools.MMSceneLoadingManager.LoadAsynchronously ( )
protectedvirtual

Loads the scene to load asynchronously.

◆ LoadingComplete()

virtual void MoreMountains.Tools.MMSceneLoadingManager.LoadingComplete ( )
protectedvirtual

Triggered when the actual loading is done, replaces the progress bar with the complete animation

◆ LoadingSetup()

virtual void MoreMountains.Tools.MMSceneLoadingManager.LoadingSetup ( )
protectedvirtual

Sets up all visual elements, fades from black at the start

◆ LoadScene() [1/2]

static void MoreMountains.Tools.MMSceneLoadingManager.LoadScene ( string  sceneToLoad)
static

Call this static method to load a scene from anywhere

Parameters
sceneToLoadLevel name.

◆ LoadScene() [2/2]

static void MoreMountains.Tools.MMSceneLoadingManager.LoadScene ( string  sceneToLoad,
string  loadingSceneName 
)
static

Call this static method to load a scene from anywhere

Parameters
sceneToLoadLevel name.

◆ Start()

virtual void MoreMountains.Tools.MMSceneLoadingManager.Start ( )
protectedvirtual

On Start(), we start loading the new level asynchronously

◆ Update()

virtual void MoreMountains.Tools.MMSceneLoadingManager.Update ( )
protectedvirtual

Every frame, we fill the bar smoothly according to loading progress

Member Data Documentation

◆ _asyncOperation

AsyncOperation MoreMountains.Tools.MMSceneLoadingManager._asyncOperation
protected

◆ _fadeDuration

float MoreMountains.Tools.MMSceneLoadingManager._fadeDuration = 0.5f
protected

◆ _fillTarget

float MoreMountains.Tools.MMSceneLoadingManager._fillTarget =0f
protected

◆ _loadingTextValue

string MoreMountains.Tools.MMSceneLoadingManager._loadingTextValue
protected

◆ _progressBarImage

Image MoreMountains.Tools.MMSceneLoadingManager._progressBarImage
protected

◆ _sceneToLoad

string MoreMountains.Tools.MMSceneLoadingManager._sceneToLoad = ""
staticprotected

◆ _tween

MMTweenType MoreMountains.Tools.MMSceneLoadingManager._tween
staticprotected

◆ ExitFadeDuration

float MoreMountains.Tools.MMSceneLoadingManager.ExitFadeDuration =0.2f

the duration (in seconds) of the load complete fade out

◆ LoadCompleteDelay

float MoreMountains.Tools.MMSceneLoadingManager.LoadCompleteDelay =0.5f

the delay (in seconds) before leaving the scene when complete

◆ LoadingAnimation

CanvasGroup MoreMountains.Tools.MMSceneLoadingManager.LoadingAnimation

the canvas group containing the animation

◆ LoadingCompleteAnimation

CanvasGroup MoreMountains.Tools.MMSceneLoadingManager.LoadingCompleteAnimation

the canvas group containing the animation to play when loading is complete

◆ LoadingProgressBar

CanvasGroup MoreMountains.Tools.MMSceneLoadingManager.LoadingProgressBar

the canvas group containing the progress bar

◆ LoadingScreenSceneName

string MoreMountains.Tools.MMSceneLoadingManager.LoadingScreenSceneName ="LoadingScreen"
static

The name of the scene to load while the actual target scene is loading (usually a loading screen)

◆ LoadingText

Text MoreMountains.Tools.MMSceneLoadingManager.LoadingText

the text object where you want the loading message to be displayed

◆ ProgressBarSpeed

float MoreMountains.Tools.MMSceneLoadingManager.ProgressBarSpeed =2f

the speed of the progress bar

◆ StartFadeDuration

float MoreMountains.Tools.MMSceneLoadingManager.StartFadeDuration =0.2f

the duration (in seconds) of the initial fade in


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