Resources-based implementation of the asset source pattern. More...
Public Member Functions | |
void | Acquire (bool synchronous) |
Loads the asset. In synchronous mode, the asset is loaded immediately. In asynchronous mode, the asset is loaded in the background. More... | |
void | Release () |
Unloads the asset. If the asset is not loaded, an exception is thrown. If the asset is loaded multiple times, it is only unloaded when the last acquire is released. More... | |
T | WaitForResult () |
Blocks until the asset is loaded. If the asset is not loaded, an exception is thrown. More... | |
Public Attributes | |
string | Description => $"Resource: {ResourcePath}{(!string.IsNullOrEmpty(SubObjectName) ? $"[{SubObjectName}]" : "")}" |
The description of the asset source. Used for debugging. More... | |
string | ResourcePath |
Resource path. Note that this is a Unity resource path, not a file path. More... | |
string | SubObjectName |
Sub-object name. If empty, the main object is loaded. More... | |
Properties | |
bool | IsCompleted [get] |
Returns true if the asset is loaded. More... | |
Resources-based implementation of the asset source pattern.
T |
T | : | UnityEngine.Object |
|
inline |
Loads the asset. In synchronous mode, the asset is loaded immediately. In asynchronous mode, the asset is loaded in the background.
synchronous |
|
inline |
Unloads the asset. If the asset is not loaded, an exception is thrown. If the asset is loaded multiple times, it is only unloaded when the last acquire is released.
Exception |
|
inline |
Blocks until the asset is loaded. If the asset is not loaded, an exception is thrown.
string Quantum.QuantumAssetSourceResource< T >.ResourcePath |
Resource path. Note that this is a Unity resource path, not a file path.
string Quantum.QuantumAssetSourceResource< T >.SubObjectName |
Sub-object name. If empty, the main object is loaded.
string Quantum.QuantumAssetSourceResource< T >.Description => $"Resource: {ResourcePath}{(!string.IsNullOrEmpty(SubObjectName) ? $"[{SubObjectName}]" : "")}" |
The description of the asset source. Used for debugging.
|
get |
Returns true
if the asset is loaded.