JUtils
A unity utilities library
|
A simple service manager More...
Static Public Member Functions | |
static bool | Exists< T > () |
Check if a service exists More... | |
static bool | Exists (Type serviceType) |
Check if a service exists More... | |
static T | Get< T > () |
Get the instance of the given service More... | |
static IService | Get (Type serviceType) |
Get the instance of the given service More... | |
static void | Register (Type serviceType, IService service) |
Register a new service and initialize it. Will throw if it already exists. More... | |
static void | Remove< T > () |
Remove an existing service and dispose it More... | |
static void | Remove (Type type) |
Remove an existing service and dispose it More... | |
Additional Inherited Members | |
Protected Member Functions inherited from JUtils.AutoSingletonBehaviour< ServiceManager > | |
virtual void | Awake () |
virtual void | OnDestroy () |
Properties inherited from JUtils.AutoSingletonBehaviour< ServiceManager > | |
static T | instance [get] |
static bool | exists [get] |
A simple service manager
|
inlinestatic |
Check if a service exists
References JUtils.AutoSingletonBehaviour< ServiceManager >.instance.
|
inlinestatic |
Check if a service exists
T | : | IService |
References JUtils.AutoSingletonBehaviour< ServiceManager >.instance.
|
inlinestatic |
Get the instance of the given service
References JUtils.AutoSingletonBehaviour< ServiceManager >.instance.
|
inlinestatic |
Get the instance of the given service
T | : | IService |
References JUtils.ServiceManager.Get().
|
inlinestatic |
Register a new service and initialize it. Will throw if it already exists.
References JUtils.AssemblyJUtils.ExtendsClassOrInterface(), JUtils.IService.Init(), and JUtils.AutoSingletonBehaviour< ServiceManager >.instance.
|
inlinestatic |
Remove an existing service and dispose it
References JUtils.IService.Dispose(), JUtils.ServiceManager.Get(), and JUtils.AutoSingletonBehaviour< ServiceManager >.instance.
|
inlinestatic |
Remove an existing service and dispose it
T | : | IService |
References JUtils.ServiceManager.Remove().