logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityAppReadinessGate

    Unity implementation of IAppReadinessGate that manages application startup synchronization.
    Initializes Addressables, preloads specified assets, prewarms Unity Timeline assets, and ensures stable frame rates before signaling the application is ready for user interaction.
    Uses a timeout mechanism to prevent infinite waiting during startup.

    Inheritance
    object
    UnityAppReadinessGate
    Implements
    IAppReadinessGate
    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.Services
    Assembly: Serenity.UnityGlobal.Infrastructure.dll
    Syntax
    public class UnityAppReadinessGate : IAppReadinessGate

    Constructors

    UnityAppReadinessGate(ILogService)

    Initializes a new instance of UnityAppReadinessGate with the specified logging service.

    Declaration
    public UnityAppReadinessGate(ILogService logService)
    Parameters
    Type Name Description
    ILogService logService

    Service for logging readiness gate operations and warnings

    Methods

    WaitUntilReadyAsync(AppReadinessOptions, CancellationToken)

    Waits until the application is ready by performing initialization steps and ensuring stable performance.

    1. Initializes Unity Addressables system
    2. Preloads assets specified by keys/labels in options
    3. Prewarms Timeline assets if specified in hints
    4. Waits for stable frame rates within performance thresholds
    5. Performs final end-of-frame synchronization
    Declaration
    public Task WaitUntilReadyAsync(AppReadinessOptions options = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AppReadinessOptions options

    Configuration options for readiness checking, or null for defaults

    CancellationToken cancellationToken

    Cancellation token to abort the readiness wait

    Returns
    Type Description
    Task

    Task that completes when the application is ready for user interaction

    Implements

    IAppReadinessGate
    In this article
    © 2026 Serenity. All Rights Reserved