Corgi Engine v9.4
Loading...
Searching...
No Matches
MoreMountains.Tools.MMSceneLoadingAntiSpill Class Reference

This helper class, meant to be used by the MMAdditiveSceneLoadingManager, creates a temporary scene to store objects that might get instantiated, and empties it in the destination scene once loading is complete. More...

Public Member Functions

virtual void PrepareAntiFill (string sceneToLoadName, string antiSpillSceneName="")
 Creates the temporary scene.

Protected Member Functions

virtual void PrepareAntiFillOnSceneLoaded (Scene newScene, LoadSceneMode mode)
 When not creating an anti fill scene, acts once the scene has been actually created and is ready to be set active This is bypassed when creating the scene.
virtual void PrepareAntiFillSetSceneActive ()
 Sets the anti spill scene active.
virtual void OnActiveSceneChanged (Scene from, Scene to)
 Once the destination scene has been loaded, we catch that event and prepare to empty.
virtual void EmptyAntiSpillScene ()
 Empties the contents of the anti spill scene into the destination scene.

Protected Attributes

Scene _antiSpillScene
Scene _destinationScene
UnityAction< Scene, Scene > _onActiveSceneChangedCallback
string _sceneToLoadName
string _antiSpillSceneName
List< GameObject > _spillSceneRoots = new List<GameObject>(50)

Static Protected Attributes

static List< string > _scenesInBuild

Detailed Description

This helper class, meant to be used by the MMAdditiveSceneLoadingManager, creates a temporary scene to store objects that might get instantiated, and empties it in the destination scene once loading is complete.

Member Function Documentation

◆ EmptyAntiSpillScene()

virtual void MoreMountains.Tools.MMSceneLoadingAntiSpill.EmptyAntiSpillScene ( )
protectedvirtual

Empties the contents of the anti spill scene into the destination scene.

◆ OnActiveSceneChanged()

virtual void MoreMountains.Tools.MMSceneLoadingAntiSpill.OnActiveSceneChanged ( Scene from,
Scene to )
protectedvirtual

Once the destination scene has been loaded, we catch that event and prepare to empty.

Parameters
from
to

◆ PrepareAntiFill()

virtual void MoreMountains.Tools.MMSceneLoadingAntiSpill.PrepareAntiFill ( string sceneToLoadName,
string antiSpillSceneName = "" )
virtual

Creates the temporary scene.

Parameters
sceneToLoadName

◆ PrepareAntiFillOnSceneLoaded()

virtual void MoreMountains.Tools.MMSceneLoadingAntiSpill.PrepareAntiFillOnSceneLoaded ( Scene newScene,
LoadSceneMode mode )
protectedvirtual

When not creating an anti fill scene, acts once the scene has been actually created and is ready to be set active This is bypassed when creating the scene.

Parameters
newScene
mode

◆ PrepareAntiFillSetSceneActive()

virtual void MoreMountains.Tools.MMSceneLoadingAntiSpill.PrepareAntiFillSetSceneActive ( )
protectedvirtual

Sets the anti spill scene active.

Member Data Documentation

◆ _antiSpillScene

Scene MoreMountains.Tools.MMSceneLoadingAntiSpill._antiSpillScene
protected

◆ _antiSpillSceneName

string MoreMountains.Tools.MMSceneLoadingAntiSpill._antiSpillSceneName
protected

◆ _destinationScene

Scene MoreMountains.Tools.MMSceneLoadingAntiSpill._destinationScene
protected

◆ _onActiveSceneChangedCallback

UnityAction<Scene, Scene> MoreMountains.Tools.MMSceneLoadingAntiSpill._onActiveSceneChangedCallback
protected

◆ _scenesInBuild

List<string> MoreMountains.Tools.MMSceneLoadingAntiSpill._scenesInBuild
staticprotected

◆ _sceneToLoadName

string MoreMountains.Tools.MMSceneLoadingAntiSpill._sceneToLoadName
protected

◆ _spillSceneRoots

List<GameObject> MoreMountains.Tools.MMSceneLoadingAntiSpill._spillSceneRoots = new List<GameObject>(50)
protected

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