A base class for ScriptableObjects that are meant to be globally accessible, at edit-time and runtime. The way such objects are loaded is driven by usages of FusionGlobalScriptableObjectSourceAttribute attributes.
More...
Inherits FusionScriptableObject, and FusionGlobalScriptableObject.
|
| 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. More...
|
| |
| bool | IsGlobal [get] |
| | Is this instance a global instance. More...
|
| |
| static bool | IsGlobalLoadedInternal [get] |
| | Returns true if a global instance is loaded. Compared to GlobalInternal, it does not attempt to load an instance. More...
|
| |
A base class for ScriptableObjects that are meant to be globally accessible, at edit-time and runtime. The way such objects are loaded is driven by usages of FusionGlobalScriptableObjectSourceAttribute attributes.
◆ OnDisable()
| virtual void OnDisable |
( |
| ) |
|
|
protectedvirtual |
◆ OnLoadedAsGlobal()
| virtual void OnLoadedAsGlobal |
( |
| ) |
|
|
protectedvirtual |
Invoked when the instance is loaded as global.
◆ OnUnloadedAsGlobal()
| virtual void OnUnloadedAsGlobal |
( |
bool |
destroyed | ) |
|
|
protectedvirtual |
Invoked when the instance is unloaded as global.
- Parameters
-
◆ TryGetGlobalInternal()
| static bool TryGetGlobalInternal |
( |
out T |
global | ) |
|
|
staticprotected |
Loads or returns the current global instance. Returns null if loading an instance failed.
- Parameters
-
- Returns
◆ UnloadGlobalInternal()
| static 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 | |
◆ IsGlobal
Is this instance a global instance.
◆ IsGlobalLoadedInternal
| bool IsGlobalLoadedInternal |
|
staticgetprotected |
Returns true if a global instance is loaded. Compared to GlobalInternal, it does not attempt to load an instance.