logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IGameplayReadinessGate

    Explicit readiness gate for a gameplay session.

    Namespace: Serenity.GameMode.Application.Interfaces
    Assembly: Serenity.GameMode.Application.dll
    Syntax
    public interface IGameplayReadinessGate
    Remarks

    Allows gameplay-side code to signal that its own initialization (stage prefab instantiation, player spawn, first-tick animation snap, etc.) has completed and the scene is in a visually stable state. Consumed by IGameModeService to decide when gameplay content can be revealed. The gate is re-usable across sessions via Reset().

    Properties

    IsReady

    True once MarkReady() has been called for the current session.

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

    Methods

    MarkReady()

    Marks the current session ready. Idempotent within a session.

    Declaration
    void MarkReady()

    Reset()

    Resets the gate so the next session starts in the not-ready state.

    Declaration
    void Reset()

    WaitUntilReadyAsync(CancellationToken)

    Completes when the current session is marked ready, or when cancellationToken is cancelled.

    Declaration
    Task WaitUntilReadyAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    In this article
    © 2026 Serenity. All Rights Reserved