logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    UnityAddressableUtils
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Global.Infrastructure.Utils
    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
    Type Name Description
    CancellationToken cancellationToken
    Action<T> perAsset
    Returns
    Type Description
    Task<IList<T>>
    Type Parameters
    Name Description
    T

    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
    Name Description
    T
    In this article
    © 2026 Serenity. All Rights Reserved