JUtils
A unity utilities library
JUtils.SingletonManager Class Reference

Centralized singleton to fix reference & hot reload issues issues More...

Inheritance diagram for JUtils.SingletonManager:
Collaboration diagram for JUtils.SingletonManager:

Static Public Member Functions

static T GetSingleton< T > ()
 Get a singleton stored in the manager More...
 
static bool TryGetSingleton< T > (out T singleton)
 Try get a singleton stored in the manager More...
 
static bool SetSingleton< T > (ISingleton< T > singleton)
 Set a singleton reference More...
 
static bool RemoveSingleton< T > ()
 Remove a singleton from all lists More...
 

Properties

static SingletonManager instance [get]
 

Detailed Description

Centralized singleton to fix reference & hot reload issues issues

Member Function Documentation

◆ GetSingleton< T >()

static T JUtils.SingletonManager.GetSingleton< T > ( )
inlinestatic

Get a singleton stored in the manager

Type Constraints
T :Object 
T :ISingleton<T> 

◆ RemoveSingleton< T >()

static bool JUtils.SingletonManager.RemoveSingleton< T > ( )
inlinestatic

Remove a singleton from all lists

Type Constraints
T :Object 
T :ISingleton<T> 

References JUtils.SingletonManager.instance.

◆ SetSingleton< T >()

static bool JUtils.SingletonManager.SetSingleton< T > ( ISingleton< T >  singleton)
inlinestatic

Set a singleton reference

Type Constraints
T :Object 
T :ISingleton<T> 

References JUtils.SingletonManager.instance.

◆ TryGetSingleton< T >()

static bool JUtils.SingletonManager.TryGetSingleton< T > ( out T  singleton)
inlinestatic

Try get a singleton stored in the manager

Type Constraints
T :Object 
T :ISingleton<T> 

References JUtils.SingletonManager.instance.

Property Documentation

◆ instance

SingletonManager JUtils.SingletonManager.instance
staticget

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