Photon Quantum 3.0.0

Static Public Member Functions | List of all members
Quantum.IResourceManagerExtensions Class Reference

Extension methods for IResourceManager. More...

Static Public Member Functions

static bool DisposeAsset< TResourceManager > (this TResourceManager resourceManager, string assetPath)
 Disposes an asset based on its path. More...
 
static AssetGuid FindAssetGuid< TResourceManager > (this TResourceManager resourceManager, [HandlesResourceDisposal] AssetObjectQuery query)
 Finds the asset GUID based on the provided query. More...
 
static List< AssetGuidFindAssetGuids< TResourceManager > (this TResourceManager resourceManager, [HandlesResourceDisposal] AssetObjectQuery query)
 Finds the asset GUIDs based on the provided query. More...
 
static void FindAssetGuids< TResourceManager > (this TResourceManager resourceManager, [HandlesResourceDisposal] AssetObjectQuery query, List< AssetGuid > result)
 Finds the asset GUIDs based on the provided query. More...
 
static List< AssetObjectGetAllLoadedAssets< TResourceManager > (this TResourceManager resourceManager)
 Gets all loaded assets from the resource manager. More...
 
static AssetObject GetAsset< TResourceManager > (this TResourceManager resourceManager, AssetRef assetRef)
 Returns the asset object of the provided asset reference. More...
 
static AssetObject GetAsset< TResourceManager > (this TResourceManager resourceManager, string assetPath)
 Gets an asset based on its path. More...
 
static List< AssetObjectGetAssets< TResourceManager > (this TResourceManager resourceManager, [HandlesResourceDisposal] AssetObjectQuery query)
 Gets the assets based on the provided query. More...
 
static void GetAssets< TResourceManager > (this TResourceManager resourceManager, [HandlesResourceDisposal] AssetObjectQuery query, List< AssetObject > result)
 Gets the assets based on the provided query. More...
 
static List< AssetObjectLoadAllAssets< TResourceManager > (this TResourceManager resourceManager)
 Loads all assets from the resource manager. More...
 
static bool LoadAssetAsync< TResourceManager > (this TResourceManager resourceManager, string assetPath)
 Loads an asset asynchronously based on its path. More...
 
static bool TryGetAsset< TResourceManager, T > (this TResourceManager resourceManager, AssetGuid assetGuid, out T result)
 Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed. More...
 
static bool TryGetAsset< TResourceManager, T > (this TResourceManager resourceManager, AssetRef assetRef, out T result)
 Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed. More...
 
static bool TryGetAsset< TResourceManager, T > (this TResourceManager resourceManager, AssetRef< T > assetRef, out T result)
 Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed. More...
 
static bool TryGetAsset< TResourceManager, T > (this TResourceManager resourceManager, string assetPath, out T result)
 Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed. More...
 

Detailed Description

Extension methods for IResourceManager.

Member Function Documentation

◆ GetAsset< TResourceManager >() [1/2]

static AssetObject Quantum.IResourceManagerExtensions.GetAsset< TResourceManager > ( this TResourceManager  resourceManager,
AssetRef  assetRef 
)
inlinestatic

Returns the asset object of the provided asset reference.

Parameters
resourceManagerThe resource manager.
assetRefThe asset reference.
Returns
The loaded asset object or null, if not found.
Type Constraints
TResourceManager :IResourceManager 

◆ TryGetAsset< TResourceManager, T >() [1/4]

static bool Quantum.IResourceManagerExtensions.TryGetAsset< TResourceManager, T > ( this TResourceManager  resourceManager,
AssetGuid  assetGuid,
out T  result 
)
inlinestatic

Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed.

Parameters
resourceManagerThe resource manager.
assetGuidThe guid of the asset.
resultThe result asset object.
Returns
true if the asset of type T exists.
Type Constraints
TResourceManager :IResourceManager 
T :AssetObject 

◆ TryGetAsset< TResourceManager, T >() [2/4]

static bool Quantum.IResourceManagerExtensions.TryGetAsset< TResourceManager, T > ( this TResourceManager  resourceManager,
AssetRef  assetRef,
out T  result 
)
inlinestatic

Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed.

Parameters
resourceManagerThe resource manager.
assetRefThe asset reference.
resultThe result asset object.
Returns
true if the asset of type T exists.
Type Constraints
TResourceManager :IResourceManager 
T :AssetObject 

◆ TryGetAsset< TResourceManager, T >() [3/4]

static bool Quantum.IResourceManagerExtensions.TryGetAsset< TResourceManager, T > ( this TResourceManager  resourceManager,
AssetRef< T >  assetRef,
out T  result 
)
inlinestatic

Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed.

Parameters
resourceManagerThe resource manager.
assetRefThe asset reference.
resultThe result asset object.
Returns
true if the asset of type T exists.
Type Constraints
TResourceManager :IResourceManager 
T :AssetObject 

◆ TryGetAsset< TResourceManager, T >() [4/4]

static bool Quantum.IResourceManagerExtensions.TryGetAsset< TResourceManager, T > ( this TResourceManager  resourceManager,
string  assetPath,
out T  result 
)
inlinestatic

Tries to get an asset of type T from the resource manager. Note that if type T is not the same as the asset type, the asset will remain loaded in the memory until it is disposed.

Parameters
resourceManagerThe resource manager.
assetPathThe path of the asset.
resultThe result asset object.
Returns
true if the asset of type T exists.
Type Constraints
TResourceManager :IResourceManager 
T :AssetObject 

◆ DisposeAsset< TResourceManager >()

static bool Quantum.IResourceManagerExtensions.DisposeAsset< TResourceManager > ( this TResourceManager  resourceManager,
string  assetPath 
)
inlinestatic

Disposes an asset based on its path.

Parameters
resourceManagerThe resource manager.
assetPathThe path of the asset.
Returns
true if the asset is disposed successfully.
Type Constraints
TResourceManager :IResourceManager 

◆ GetAsset< TResourceManager >() [2/2]

static AssetObject Quantum.IResourceManagerExtensions.GetAsset< TResourceManager > ( this TResourceManager  resourceManager,
string  assetPath 
)
inlinestatic

Gets an asset based on its path.

Parameters
resourceManagerThe resource manager.
assetPathThe path of the asset.
Returns
The asset object.
Type Constraints
TResourceManager :IResourceManager 

◆ LoadAssetAsync< TResourceManager >()

static bool Quantum.IResourceManagerExtensions.LoadAssetAsync< TResourceManager > ( this TResourceManager  resourceManager,
string  assetPath 
)
inlinestatic

Loads an asset asynchronously based on its path.

Parameters
resourceManagerThe resource manager.
assetPathThe path of the asset.
Returns
true if the asset is loaded successfully.
Type Constraints
TResourceManager :IResourceManager 

◆ FindAssetGuid< TResourceManager >()

static AssetGuid Quantum.IResourceManagerExtensions.FindAssetGuid< TResourceManager > ( this TResourceManager  resourceManager,
[HandlesResourceDisposal] AssetObjectQuery  query 
)
inlinestatic

Finds the asset GUID based on the provided query.

Parameters
resourceManagerThe resource manager.
queryThe query to filter the assets.
Returns
The asset GUID.
Type Constraints
TResourceManager :IResourceManager 

◆ FindAssetGuids< TResourceManager >() [1/2]

static void Quantum.IResourceManagerExtensions.FindAssetGuids< TResourceManager > ( this TResourceManager  resourceManager,
[HandlesResourceDisposal] AssetObjectQuery  query,
List< AssetGuid result 
)
inlinestatic

Finds the asset GUIDs based on the provided query.

Parameters
resourceManagerThe resource manager.
queryThe query to filter the assets.
resultThe list to store the asset GUIDs.
Type Constraints
TResourceManager :IResourceManager 

◆ FindAssetGuids< TResourceManager >() [2/2]

static List<AssetGuid> Quantum.IResourceManagerExtensions.FindAssetGuids< TResourceManager > ( this TResourceManager  resourceManager,
[HandlesResourceDisposal] AssetObjectQuery  query 
)
inlinestatic

Finds the asset GUIDs based on the provided query.

Parameters
resourceManagerThe resource manager.
queryThe query to filter the assets.
Returns
The list of asset GUIDs.
Type Constraints
TResourceManager :IResourceManager 

◆ GetAssets< TResourceManager >() [1/2]

static List<AssetObject> Quantum.IResourceManagerExtensions.GetAssets< TResourceManager > ( this TResourceManager  resourceManager,
[HandlesResourceDisposal] AssetObjectQuery  query 
)
inlinestatic

Gets the assets based on the provided query.

Parameters
resourceManagerThe resource manager.
queryThe query to filter the assets.
Returns
The list of asset objects.
Type Constraints
TResourceManager :IResourceManager 

◆ GetAssets< TResourceManager >() [2/2]

static void Quantum.IResourceManagerExtensions.GetAssets< TResourceManager > ( this TResourceManager  resourceManager,
[HandlesResourceDisposal] AssetObjectQuery  query,
List< AssetObject result 
)
inlinestatic

Gets the assets based on the provided query.

Parameters
resourceManagerThe resource manager.
queryThe query to filter the assets.
resultThe list to store the asset objects.
Type Constraints
TResourceManager :IResourceManager 

◆ LoadAllAssets< TResourceManager >()

static List<AssetObject> Quantum.IResourceManagerExtensions.LoadAllAssets< TResourceManager > ( this TResourceManager  resourceManager)
inlinestatic

Loads all assets from the resource manager.

Parameters
resourceManagerThe resource manager.
Returns
The list of loaded asset objects.
Type Constraints
TResourceManager :IResourceManager 

◆ GetAllLoadedAssets< TResourceManager >()

static List<AssetObject> Quantum.IResourceManagerExtensions.GetAllLoadedAssets< TResourceManager > ( this TResourceManager  resourceManager)
inlinestatic

Gets all loaded assets from the resource manager.

Parameters
resourceManagerThe resource manager.
Returns
The list of loaded asset objects.
Type Constraints
TResourceManager :IResourceManager