|
Kanda Foundation 0.2.0
|
An application-level service container which spans the lifetime of multiple scenes. If it is a root service which does not depend on others, you can register it in [RuntimeInitializeOnLoad] so it's available immediately. Otherwise, you wait for other services to be available, and register it in Awake.
More...
Static Public Member Functions | |
| static void | ClearServices () |
| Clears all registered services. | |
| static void | Register< T > (T instance, bool overwriteExisting=false) |
| static T | Get< T > () |
| static async Task< T > | GetAsync< T > (AsyncObjectResolutionOptions options=null) |
An application-level service container which spans the lifetime of multiple scenes. If it is a root service which does not depend on others, you can register it in [RuntimeInitializeOnLoad] so it's available immediately. Otherwise, you wait for other services to be available, and register it in Awake.