Highroad Engine v1.3
Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
MoreMountains.Tools.MMPersistentSingleton< T > Class Template Reference

Persistent singleton. More...

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

Public Attributes

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

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. More...
 

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 More...
 

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.MMSoundManager.

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

◆ 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: