Class UnityAddressableUtils
Direct API to load ALL from Addressables (no filtering, no caching).
Prefer the unified API: LoadAllFromAnyBlocking<T>(string).
Every public entry point is gated by SerenityAssetLoadingModeProvider:
- In
ResourcesOnly mode the methods short-circuit and return an
empty list without touching the Addressables API. A one-time verbose log explains the
no-op so a caller that genuinely needed Addressables sees the divergence. - In Addressables-using modes the behaviour is unchanged; the blocking
variant additionally throws NotSupportedException on WebGL because
WaitForCompletion cannot be serviced there.
Inheritance
UnityAddressableUtils
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public static class UnityAddressableUtils
Methods
DebugDumpAddressables()
Debug method to dump all Addressables keys and their locations to the log (verbose).
Declaration
public static void DebugDumpAddressables()
LoadAllAsync<T>(CancellationToken, Action<T>)
Loads all assets of type T from Addressables (async). Returns an empty list
in ResourcesOnly
mode without touching Addressables.
Declaration
public static Task<IList<T>> LoadAllAsync<T>(CancellationToken cancellationToken = default, Action<T> perAsset = null)
Parameters
Returns
Type Parameters
LoadAllBlocking<T>(Action<T>)
Loads all assets of type T from Addressables (blocking). Returns an empty
list in ResourcesOnly
mode without touching Addressables. Throws NotSupportedException on
WebGL in any Addressables-using mode (the sync WaitForCompletion path is
unsupported there).
Declaration
public static IList<T> LoadAllBlocking<T>(Action<T> perAsset = null)
Parameters
| Type |
Name |
Description |
| Action<T> |
perAsset |
|
Returns
| Type |
Description |
| IList<T> |
|
Type Parameters