Represents an asset manager that can load, unload, and dispose AssetObject. More...
Public Member Functions | |
bool | DisposeAsset (AssetGuid guid) |
Schedules an asset for disposal or disposes it immediately. More... | |
bool | FindNextAssetGuid (ref AssetObjectQuery query, out AssetGuid guid) |
Finds the next asset GUID based on the provided query. More... | |
AssetObject | GetAsset (AssetGuid guid) |
Loads an asset synchronously, blocking until it returns. Before the asset gets returned for the first time, the manager needs to have called AssetObject.Loaded. More... | |
AssetGuid | GetAssetGuid (string path) |
Converts a path to an asset GUID. More... | |
AssetObjectState | GetAssetState (AssetGuid guid) |
Gets the state of an asset. More... | |
Type | GetAssetType (AssetGuid guid) |
Gets the type of an asset. More... | |
bool | LoadAssetAsync (AssetGuid guid) |
Preloads an asset. The asset will be loaded asynchronously and will be available for use after the next call to one of the GetAsset methods. More... | |
void | Update (bool inSimulation=false, in Profiler profiler=default) |
Called after the simulation has run and all tasks have finished. Always executed by the main Quantum thread. More... | |
Events | |
AssetObjectDisposingDelegate | AssetObjectDisposing |
Invoked before AssetObject.Disposed. Exposed as an event, because assets may be disposed externally. Any code using any form of asset caching needs to be aware of that happening. More... | |
Represents an asset manager that can load, unload, and dispose AssetObject.
bool Quantum.IResourceManager.DisposeAsset | ( | AssetGuid | guid | ) |
Schedules an asset for disposal or disposes it immediately.
guid | The GUID of the asset to dispose. |
true
if the asset exists.Implemented in Quantum.ResourceManagerStatic.
AssetObject Quantum.IResourceManager.GetAsset | ( | AssetGuid | guid | ) |
Loads an asset synchronously, blocking until it returns. Before the asset gets returned for the first time, the manager needs to have called AssetObject.Loaded.
guid | The GUID of the asset to load. |
Implemented in Quantum.QuantumUnityDB, and Quantum.ResourceManagerStatic.
bool Quantum.IResourceManager.LoadAssetAsync | ( | AssetGuid | guid | ) |
Preloads an asset. The asset will be loaded asynchronously and will be available for use after the next call to one of the GetAsset methods.
guid | The GUID of the asset to preload. |
true
if the asset exists.Implemented in Quantum.QuantumUnityDB, and Quantum.ResourceManagerStatic.
AssetGuid Quantum.IResourceManager.GetAssetGuid | ( | string | path | ) |
Converts a path to an asset GUID.
path | The path of the asset. |
Implemented in Quantum.QuantumUnityDB, and Quantum.ResourceManagerStatic.
AssetObjectState Quantum.IResourceManager.GetAssetState | ( | AssetGuid | guid | ) |
Gets the state of an asset.
guid | The GUID of the asset. |
Implemented in Quantum.QuantumUnityDB, and Quantum.ResourceManagerStatic.
Type Quantum.IResourceManager.GetAssetType | ( | AssetGuid | guid | ) |
Gets the type of an asset.
guid | The GUID of the asset. |
Implemented in Quantum.QuantumUnityDB, and Quantum.ResourceManagerStatic.
bool Quantum.IResourceManager.FindNextAssetGuid | ( | ref AssetObjectQuery | query, |
out AssetGuid | guid | ||
) |
Finds the next asset GUID based on the provided query.
query | The query to filter the assets. |
guid | The GUID of the next asset. |
true
if there is a next asset.Implemented in Quantum.QuantumUnityDB, and Quantum.ResourceManagerStatic.
void Quantum.IResourceManager.Update | ( | bool | inSimulation = false , |
in Profiler | profiler = default |
||
) |
Called after the simulation has run and all tasks have finished. Always executed by the main Quantum thread.
inSimulation | true if the update is happening during a simulation. |
profiler | The profiler used for profiling. |
Implemented in Quantum.ResourceManagerStatic.
AssetObjectDisposingDelegate Quantum.IResourceManager.AssetObjectDisposing |
Invoked before AssetObject.Disposed. Exposed as an event, because assets may be disposed externally. Any code using any form of asset caching needs to be aware of that happening.