Class 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.
Namespace: Serenity.GameCamera.Infrastructure.Components
Assembly: Serenity.UnityGameCamera.Infrastructure.dll
Syntax
public class UnityGameCameraRegistrar : MonoBehaviour
Constructors
UnityGameCameraRegistrar()
Declaration
public UnityGameCameraRegistrar()