Corgi Engine  v9.1
MoreMountains.Tools.MMSingleton< T > Class Template Reference

Singleton pattern. More...

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

Static Public Member Functions

static T TryGetInstance ()
 

Static Public Attributes

static bool HasInstance => _instance != null
 
static T Current => _instance
 

Protected Member Functions

virtual void Awake ()
 On awake, we initialize our instance. Make sure to call base.Awake() in override if you need awake. More...
 
virtual void InitializeSingleton ()
 Initializes the singleton. More...
 

Static Protected Attributes

static T _instance
 

Properties

static T Instance [get]
 Singleton design pattern More...
 

Detailed Description

Singleton pattern.

Type Constraints
T :Component 

Member Function Documentation

◆ Awake()

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

◆ InitializeSingleton()

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

Initializes the singleton.

◆ TryGetInstance()

static T MoreMountains.Tools.MMSingleton< T >.TryGetInstance ( )
static

Member Data Documentation

◆ _instance

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

◆ Current

T MoreMountains.Tools.MMSingleton< T >.Current => _instance
static

◆ HasInstance

bool MoreMountains.Tools.MMSingleton< T >.HasInstance => _instance != null
static

Property Documentation

◆ Instance

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

Singleton design pattern

The instance.


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