Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Tools.MMPersistentSingleton< T > Class Template Reference

Persistent singleton. More...

Inheritance diagram for MoreMountains.Tools.MMPersistentSingleton< T >:
MoreMountains.Tools.MMPersistenceManager MoreMountains.Tools.MMSoundManager

Public Attributes

bool AutomaticallyUnparentOnAwake = true
 if this is true, this singleton will auto detach if it finds itself parented on awake

Protected Member Functions

virtual void Awake ()
 On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it.
virtual void InitializeSingleton ()
 Initializes the singleton.

Protected Attributes

bool _enabled

Static Protected Attributes

static T _instance

Properties

static bool HasInstance [get]
static T Current [get]
static T Instance [get]
 Singleton design pattern.

Detailed Description

Persistent singleton.

Type Constraints
T :Component 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMPersistentSingleton< T >.Awake ( )
protectedvirtual

On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it.

Reimplemented in MoreMountains.Tools.MMPersistenceManager, and MoreMountains.Tools.MMSoundManager.

◆ InitializeSingleton()

virtual void MoreMountains.Tools.MMPersistentSingleton< T >.InitializeSingleton ( )
protectedvirtual

Initializes the singleton.

Member Data Documentation

◆ _enabled

bool MoreMountains.Tools.MMPersistentSingleton< T >._enabled
protected

◆ _instance

T MoreMountains.Tools.MMPersistentSingleton< T >._instance
staticprotected

◆ AutomaticallyUnparentOnAwake

bool MoreMountains.Tools.MMPersistentSingleton< T >.AutomaticallyUnparentOnAwake = true

if this is true, this singleton will auto detach if it finds itself parented on awake

Property Documentation

◆ Current

T MoreMountains.Tools.MMPersistentSingleton< T >.Current
staticget

◆ HasInstance

bool MoreMountains.Tools.MMPersistentSingleton< T >.HasInstance
staticget

◆ Instance

T MoreMountains.Tools.MMPersistentSingleton< T >.Instance
staticget

Singleton design pattern.

The instance.


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