Class VirtualCameraDevice
A device used to control a virtual camera.
Inheritance
Inherited Members
Namespace: Unity.LiveCapture.VirtualCamera
Syntax
public class VirtualCameraDevice : CompanionAppDevice<IVirtualCameraClient>, ICompanionAppDevice
Remarks
The virtual camera mimics the experience of using a real camera in a Unity scene. The connected client can control most of the state, such as the camera pose and lens settings, but other features like autofocus need to be computed in the editor as it needs to query the scene. The render from the virtual camera in the editor can be streamed to the client to give visual feedback of the camera state, similar to a camera viewfinder. A VirtualCameraActor and a IVirtualCameraClient must be assigned before the device is useful. The actor is needed to store live or evaluated playback state and affect the scene.
Properties
Actor
Gets the VirtualCameraActor currently assigned to this device.
Declaration
public VirtualCameraActor Actor { get; set; }
Property Value
Type | Description |
---|---|
VirtualCameraActor | The assigned actor, or null if none is assigned. |
CameraBody
The CameraBody of the current device.
Declaration
public CameraBody CameraBody { get; }
Property Value
Type | Description |
---|---|
CameraBody |
Lens
The Lens of the current device.
Declaration
public Lens Lens { get; set; }
Property Value
Type | Description |
---|---|
Lens |
LensAsset
The LensAsset of the current device.
Declaration
public LensAsset LensAsset { get; set; }
Property Value
Type | Description |
---|---|
LensAsset |
LensIntrinsics
The LensIntrinsics of the current device.
Declaration
public LensIntrinsics LensIntrinsics { get; }
Property Value
Type | Description |
---|---|
LensIntrinsics |
Origin
The position and rotation of the world's origin.
Declaration
public Pose Origin { get; }
Property Value
Type | Description |
---|---|
Pose |
Pose
The position and rotation of the current device in world coordinates.
Declaration
public Pose Pose { get; }
Property Value
Type | Description |
---|---|
Pose |
Methods
BuildLiveLink(PlayableGraph)
Builds the live link on this device using a given playable graph.
Declaration
public override void BuildLiveLink(PlayableGraph graph)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The PlayableGraph to drive the live link from. |
Overrides
GetAssetName()
Declaration
protected override string GetAssetName()
Returns
Type | Description |
---|---|
String |
Overrides
OnClientAssigned()
Declaration
protected override void OnClientAssigned()
Overrides
OnClientUnassigned()
Declaration
protected override void OnClientUnassigned()
Overrides
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()
Overrides
OnRecordingChanged()
Declaration
protected override void OnRecordingChanged()
Overrides
OnValidate()
Declaration
protected virtual void OnValidate()
UpdateClient()
Declaration
public override void UpdateClient()
Overrides
UpdateDevice()
Updates the internal state of the device.
Declaration
public override void UpdateDevice()
Overrides
Write(ITakeBuilder)
Stores the recording into a take using a ITakeBuilder.
Declaration
public override void Write(ITakeBuilder takeBuilder)
Parameters
Type | Name | Description |
---|---|---|
ITakeBuilder | takeBuilder | The take builder object. |