More...
Inherits FusionGlobalScriptableObject.
Inherited by NetworkProjectConfigAsset.
|
|
virtual void | OnDisable () |
| | If the current instance is global, unsets IsGlobal and calls OnUnloadedAsGlobal.
|
|
virtual void | OnLoadedAsGlobal () |
| | Invoked when the instance is loaded as global.
|
| virtual void | OnUnloadedAsGlobal (bool destroyed) |
| | Invoked when the instance is unloaded as global.
|
|
| static async System.Threading.Tasks.Task< T > | GetGlobalAsyncInternal () |
| | Loads or returns the current global instance asynchronously. Returns null if loading an instance failed.
|
| static bool | TryGetGlobalInternal (out T global) |
| | Loads or returns the current global instance. Returns null if loading an instance failed.
|
| static bool | UnloadGlobalInternal () |
| | Unloads the global instance if it is loaded.
|
|
| static T | GlobalInternal [get, set] |
| | A singleton instance-like property. Loads or returns the current global instance. Derived classes can package it in a property with a different name. Throws if loading an instance failed.
|
|
bool | IsGlobal [get] |
| | Is this instance a global instance.
|
|
static bool | IsGlobalLoadedInternal [get] |
| | Returns true if a global instance is loaded. Compared to GlobalInternal, it does not attempt to load an instance.
|
|
|
static void | ClearTypesFailedToLoad () |
| | Use to clear internal list marking specific type as unable to load. Types might be unable to load during bootstrap, so cleaning the list in some static initializer is a good way to ensure things can recover.
|
◆ GetGlobalAsyncInternal()
| async System.Threading.Tasks.Task< T > GetGlobalAsyncInternal |
( |
| ) |
|
|
staticprotected |
Loads or returns the current global instance asynchronously. Returns null if loading an instance failed.
- Returns
◆ OnUnloadedAsGlobal()
| virtual void OnUnloadedAsGlobal |
( |
bool | destroyed | ) |
|
|
protectedvirtual |
Invoked when the instance is unloaded as global.
- Parameters
-
◆ TryGetGlobalInternal()
| bool TryGetGlobalInternal |
( |
out T | global | ) |
|
|
staticprotected |
Loads or returns the current global instance. Returns null if loading an instance failed.
- Parameters
-
- Returns
◆ UnloadGlobalInternal()
| bool UnloadGlobalInternal |
( |
| ) |
|
|
staticprotected |
Unloads the global instance if it is loaded.
- Returns
true if an instance was unloaded
◆ GlobalInternal
A singleton instance-like property. Loads or returns the current global instance. Derived classes can package it in a property with a different name. Throws if loading an instance failed.
- Exceptions
-
| InvalidOperationException | |