Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMPersistentHumbleSingleton< T > Class Template Reference

Persistent humble singleton, basically a classic singleton but will destroy any other older components of the same type it finds on awake More...

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

Public Attributes

float InitializationTime
 the timestamp at which this singleton got initialized More...
 

Static Public Attributes

static bool HasInstance => _instance != null
 whether or not this singleton already has an instance More...
 
static T Current => _instance
 

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...
 
virtual void InitializeSingleton ()
 Initializes the singleton. More...
 

Static Protected Attributes

static T _instance
 

Properties

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

Detailed Description

Persistent humble singleton, basically a classic singleton but will destroy any other older components of the same type it finds on awake

Type Constraints
T :Component 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMPersistentHumbleSingleton< 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.

◆ InitializeSingleton()

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

Initializes the singleton.

Member Data Documentation

◆ _instance

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

◆ Current

◆ HasInstance

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

whether or not this singleton already has an instance

◆ InitializationTime

float MoreMountains.Tools.MMPersistentHumbleSingleton< T >.InitializationTime

the timestamp at which this singleton got initialized

Property Documentation

◆ Instance

Singleton design pattern

The instance.


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