logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityScreenGateway

    The only reader and writer of UnityEngine.Screen in the GameGraphics module.

    Inheritance
    object
    UnityScreenGateway
    Implements
    IScreenGateway
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameGraphics.Infrastructure.Services
    Assembly: Serenity.UnityGameGraphics.Infrastructure.dll
    Syntax
    public class UnityScreenGateway : IScreenGateway
    Remarks

    Everything the engine does asynchronously with a resolution request stays behind this class, so the service above it can be asserted on what it requested rather than on what the display happened to do — a distinction that is not observable in batchmode or in a built Player, where a requested resolution does not apply synchronously and fullscreen may be forced on.

    Constructors

    UnityScreenGateway()

    Declaration
    public UnityScreenGateway()

    Properties

    Height

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

    IsFullScreen

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

    Width

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

    Methods

    SetFullScreen(bool)

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

    SetResolution(int, int, bool)

    Declaration
    public void SetResolution(int width, int height, bool isFullScreen)
    Parameters
    Type Name Description
    int width
    int height
    bool isFullScreen

    Implements

    IScreenGateway
    In this article
    © 2026 Serenity. All Rights Reserved