Inventory Engine  v4.0
Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Attributes | Properties | List of all members
MoreMountains.Tools.MMSingleton< T > Class Template Reference

Singleton pattern. More...

Inherits MonoBehaviour.

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

On awake, we initialize our instance.

Make sure to call base.Awake() in override if you need awake.

Reimplemented in MoreMountains.Feedbacks.MMTimeManager, and MoreMountains.InventoryEngine.InventoryDemoGameManager.

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