logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IAssetLoadingModeProvider

    Business-layer contract for components that need to know which SerenityAssetLoadingMode is active for the current session. Consumers depend on this interface rather than the concrete provider so the mode source can be swapped (e.g. test doubles, alternative bootstrap mechanisms) without touching the consumer.

    Namespace: Serenity.Global.Application.Interfaces
    Assembly: Serenity.Global.Application.dll
    Syntax
    public interface IAssetLoadingModeProvider

    Properties

    IsExplicitlyConfigured

    True when SetMode(SerenityAssetLoadingMode) has been invoked at least once in this session. Lets editor flows distinguish "user kept the default" from "user explicitly picked a mode".

    Declaration
    bool IsExplicitlyConfigured { get; }
    Property Value
    Type Description
    bool

    IsResourcesOnly

    True when the active mode is strictly ResourcesOnly.

    Declaration
    bool IsResourcesOnly { get; }
    Property Value
    Type Description
    bool

    Mode

    Currently active asset loading mode. Defaults to AddressablesWithResourcesFallback when no explicit configuration has been applied.

    Declaration
    SerenityAssetLoadingMode Mode { get; }
    Property Value
    Type Description
    SerenityAssetLoadingMode

    UsesAddressables

    True when the active mode involves Addressables in any way (AddressablesOnly or AddressablesWithResourcesFallback).

    Declaration
    bool UsesAddressables { get; }
    Property Value
    Type Description
    bool

    UsesResources

    True when the active mode allows the Resources/ fallback path (ResourcesOnly or AddressablesWithResourcesFallback).

    Declaration
    bool UsesResources { get; }
    Property Value
    Type Description
    bool

    Methods

    SetMode(SerenityAssetLoadingMode)

    Sets the active loading mode. Intended to be called once from the application bootstrap; subsequent calls override the previous value.

    Declaration
    void SetMode(SerenityAssetLoadingMode mode)
    Parameters
    Type Name Description
    SerenityAssetLoadingMode mode

    The mode to activate.

    In this article
    © 2026 Serenity. All Rights Reserved