TopDown Engine v4.5
Loading...
Searching...
No Matches
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 {
  LoadStarted , BeforeEntryFade , EntryFade , AfterEntryFade ,
  UnloadOriginScene , LoadDestinationScene , LoadProgressComplete , InterpolatedLoadProgressComplete ,
  BeforeSceneActivation , ExitFade , DestinationSceneActivation , UnloadSceneLoader ,
  LoadTransitionComplete , AfterSceneActivation
}

Static Public Member Functions

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

Public Attributes

CanvasGroup LoadingProgressBar
 the canvas group containing the progress bar
CanvasGroup LoadingAnimation
 the canvas group containing the animation
CanvasGroup LoadingCompleteAnimation
 the canvas group containing the animation to play when loading is complete
float StartFadeDuration =0.2f
 the duration (in seconds) of the initial fade in
float ProgressBarSpeed =2f
 the speed of the progress bar
float ExitFadeDuration =0.2f
 the duration (in seconds) of the load complete fade out
float LoadCompleteDelay =0.5f
 the delay (in seconds) before leaving the scene when complete

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)

Protected Member Functions

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

Protected Attributes

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

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 
BeforeSceneActivation 
ExitFade 
DestinationSceneActivation 
UnloadSceneLoader 
LoadTransitionComplete 
AfterSceneActivation 

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]

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

Call this static method to load a scene from anywhere.

Parameters
sceneToLoadLevel name.

◆ LoadScene() [2/2]

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

◆ _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)

◆ 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:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Core/MMSceneLoading/Scripts/Managers/MMSceneLoadingManager.cs