Description

LckCamera is a component that integrates a standard Camera into the LIV Capture Kit (LCK) system.
It ensures proper registration with the LckMediator, manages activation/deactivation for capture, and provides access to the underlying Unity Camera component.

Usage

  • Add an LckCamera component to a GameObject with a Unity Camera.
  • The camera will automatically register itself with the LCK system at runtime.
  • Use ILckService.SetActiveCamera(cameraId) to switch between registered cameras.
  • Cameras are automatically deactivated when not in use.

Example

[Inject] private ILckService _lckService;

public void SwitchToCamera(ILckCamera camera)
{
    var result = _lckService.SetActiveCamera(camera.CameraId);
    if (!result.Success)
        Debug.LogError($"Failed to switch camera: {result.ErrorMessage}");
}

References

Fields

FieldTypeDescription
_cameraCameraReference to the Unity Camera component.
_cameraIdstringUnique identifier for this camera instance.

Properties

PropertyTypeDescription
CameraIdstringThe unique identifier for this camera.

Methods

MethodReturnsDescription
ActivateCamera(RenderTexture)voidEnables the camera and sets its targetTexture for capture.
DeactivateCamera()voidDisables the camera and clears its targetTexture.
GetCameraComponent()CameraReturns the underlying Unity Camera component.