docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VirtualCameraDevice

    A device used to control a virtual camera.

    Inheritance
    object
    VirtualCameraDevice
    Namespace: Unity.LiveCapture.VirtualCamera
    Assembly: Unity.LiveCapture.VirtualCamera.dll
    Syntax
    [AddComponentMenu("")]
    [RequireComponent(typeof(FocusPlaneRenderer))]
    [DisallowMultipleComponent]
    public class VirtualCameraDevice : CompanionAppDevice<IVirtualCameraClient>
    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)

    Declaration
    public override void BuildLiveLink(PlayableGraph graph)
    Parameters
    Type Name Description
    PlayableGraph graph

    GetAssetName()

    Declaration
    protected override string GetAssetName()
    Returns
    Type Description
    string

    OnClientAssigned()

    Declaration
    protected override void OnClientAssigned()

    OnClientUnassigned()

    Declaration
    protected override void OnClientUnassigned()

    OnDisable()

    Declaration
    protected override void OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()

    OnRecordingChanged()

    Declaration
    protected override void OnRecordingChanged()

    OnValidate()

    Declaration
    protected virtual void OnValidate()

    UpdateClient()

    Declaration
    public override void UpdateClient()

    UpdateDevice()

    Declaration
    public override void UpdateDevice()

    Write(ITakeBuilder)

    Declaration
    public override void Write(ITakeBuilder takeBuilder)
    Parameters
    Type Name Description
    ITakeBuilder takeBuilder
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)