Documentation Index
Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
Use this file to discover all available pages before exploring further.
Description
LckCamera lets you turn any Unity Camera into a capture source for in-game recording and streaming. It registers automatically with the LCK system at runtime via LckMediator, and can be activated or deactivated programmatically to switch camera angles — even during an active recording.
Usage
Use LckCamera when you want players to record or stream from multiple camera angles (e.g., selfie cam, third-person, drone cam) within your VR game.
- 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
[InjectLck] 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
| Field | Type | Description |
|---|
| _camera | Camera | Reference to the Unity Camera component. |
| _cameraId | string | Unique identifier for this camera instance. |
Properties
| Property | Type | Description |
|---|
| CameraId | string | The unique identifier for this camera. |
Methods
| Method | Returns | Description |
|---|
| ActivateCamera(RenderTexture) | void | Enables the camera and sets its targetTexture for capture. |
| DeactivateCamera() | void | Disables the camera and clears its targetTexture. Should not be called directly. |
| GetCameraComponent() | Camera | Returns the underlying Unity Camera component. |
See Also
- LckMonitor — Display the camera output on an in-game surface
- LckService — Start/stop recording and manage active cameras
- ILckCamera — Interface implemented by LckCamera