logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct PlayerViewportAssignment

    Read-only snapshot of which camera is assigned to which player and where its viewport sits on screen, returned by IGameCameraService.GetPlayerAssignments.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.GameCamera.Application.DTO
    Assembly: Serenity.GameCamera.Application.dll
    Syntax
    public readonly struct PlayerViewportAssignment

    Constructors

    PlayerViewportAssignment(int, object, ViewportRect)

    Initializes a new instance of the PlayerViewportAssignment struct.

    Declaration
    public PlayerViewportAssignment(int playerIndex, object camera, ViewportRect rect)
    Parameters
    Type Name Description
    int playerIndex

    Zero-based player index this assignment belongs to.

    object camera

    Opaque handle to the engine camera assigned to this player.

    ViewportRect rect

    The normalized viewport rect this player's camera renders to.

    Fields

    Camera

    Declaration
    public readonly object Camera
    Field Value
    Type Description
    object

    Opaque handle to the engine camera assigned to this player.

    PlayerIndex

    Declaration
    public readonly int PlayerIndex
    Field Value
    Type Description
    int

    Zero-based player index this assignment belongs to.

    Rect

    Declaration
    public readonly ViewportRect Rect
    Field Value
    Type Description
    ViewportRect

    The normalized viewport rect this player's camera renders to.

    In this article
    © 2026 Serenity. All Rights Reserved