logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IScreenGateway

    Outbound port to the engine's screen state, so the graphics service can be driven against a double instead of the real display.

    Namespace: Serenity.GameGraphics.Application.Interfaces
    Assembly: Serenity.GameGraphics.Application.dll
    Syntax
    public interface IScreenGateway
    Remarks

    A gateway rather than a provider: it reads the screen and mutates it. The surface is deliberately engine-agnostic — the assembly this lives in declares no engine references, so a fullscreen mode enum could not appear here even if the Unity implementation wants one. Callers state whether they want fullscreen; how that maps onto engine modes is the implementation's business.

    Properties

    Height

    Declaration
    int Height { get; }
    Property Value
    Type Description
    int

    Current screen height in pixels.

    IsFullScreen

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

    Whether the screen is currently fullscreen.

    Width

    Declaration
    int Width { get; }
    Property Value
    Type Description
    int

    Current screen width in pixels.

    Methods

    SetFullScreen(bool)

    Requests the fullscreen state.

    Declaration
    void SetFullScreen(bool isFullScreen)
    Parameters
    Type Name Description
    bool isFullScreen

    SetResolution(int, int, bool)

    Requests a screen resolution, together with the fullscreen state to apply with it.

    Declaration
    void SetResolution(int width, int height, bool isFullScreen)
    Parameters
    Type Name Description
    int width
    int height
    bool isFullScreen
    In this article
    © 2026 Serenity. All Rights Reserved