logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.GameCamera.Infrastructure.Components

    Classes

    UnityGameCameraExclude

    Opt-out marker component. Attach to a UnityEngine.Camera GameObject to exclude it from UnityGameCameraService auto-discovery: the camera will never be added to the registry automatically and will never be disabled by exclusive switching or split-screen.

    Explicit registration via IGameCameraService.RegisterCamera bypasses this marker — exclusion only affects auto-discovery, not a deliberate call from game code.

    This component carries no fields or behavior; its mere presence is the signal.

    UnityGameCameraRegistrar

    No-code registrar for a scene UnityEngine.Camera: on enable, resolves IGameCameraService from the service locator and registers this object's UnityEngine.Camera component; on destroy, unregisters it. Optionally also assigns the camera to a split-screen player slot.

    Resolution mirrors SignalEmitterComponent exactly: lazy lookup via TryGetStatic(out IServiceLocator) + TryGet<T>(out T), latched only on SUCCESS. The service is installed asynchronously during boot, so a registrar enabled early (e.g. a persistent init-scene camera) must retry rather than cache a failed lookup permanently — latching a failure would leave the camera unregistered for the rest of the session even after the service comes online.

    In this article
    © 2026 Serenity. All Rights Reserved