logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ActiveCameraSelector

    Pure depth-priority policy for choosing which registered camera should be active when no explicit override or explicit selection is in play. Only candidates that currently draw to the screen are eligible; among those, the highest Depth wins, with ties broken by first-encountered order (stable with respect to the input list). This selector never falls back to an engine-provided "main camera" concept — that fallback, if any, is an Infrastructure concern layered on top of this result.

    Inheritance
    object
    ActiveCameraSelector
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameCamera.Domain.Services
    Assembly: Serenity.GameCamera.Domain.dll
    Syntax
    public static class ActiveCameraSelector

    Methods

    TrySelect(IReadOnlyList<CameraCandidate>, out CameraCandidate)

    Attempts to select the highest-depth, screen-drawing candidate.

    Declaration
    public static bool TrySelect(IReadOnlyList<CameraCandidate> candidates, out CameraCandidate selected)
    Parameters
    Type Name Description
    IReadOnlyList<CameraCandidate> candidates

    The registered camera candidates to choose from.

    CameraCandidate selected

    The selected candidate, or default when no candidate qualifies.

    Returns
    Type Description
    bool

    True when a candidate was selected; false when candidates is null, empty, or none of its entries have DrawsToScreen set.

    In this article
    © 2026 Serenity. All Rights Reserved