docs.unity3d.com
    Show / Hide Table of Contents

    Class LiveCaptureDevice

    The base class for implementing a capture device. It provides a mechanism to record live data from a source and preview it in the scene.

    Inheritance
    Object
    LiveCaptureDevice
    Namespace: Unity.LiveCapture
    Syntax
    public abstract class LiveCaptureDevice : MonoBehaviour

    Methods

    GetTakeRecorder()

    Gets the ITakeRecorder that operates this device.

    Declaration
    public ITakeRecorder GetTakeRecorder()
    Returns
    Type Description
    ITakeRecorder

    The take recorder object reference.

    IsReady()

    Indicates whether a device is ready for recording.

    Declaration
    public abstract bool IsReady()
    Returns
    Type Description
    Boolean

    true if ready for recording; otherwise, false.

    IsRecording()

    Checks if the device has started recording.

    Declaration
    public abstract bool IsRecording()
    Returns
    Type Description
    Boolean

    true if the recording has started; otherwise, false.

    LiveUpdate()

    Override this method to update the device during live mode.

    Declaration
    public abstract void LiveUpdate()
    Remarks

    This method is called after the animation system execution and before the script's LateUpdate.

    OnDestroy()

    The device calls this method when the device is about to get destroyed.

    Declaration
    protected virtual void OnDestroy()
    Remarks

    If you override this method, call the base method in your implementation.

    Refresh()

    Updates the scene during edit mode.

    Declaration
    protected void Refresh()
    Remarks

    Call this method every time your device changes the scene. This method is only effective during edit mode.

    StartRecording()

    Starts a new recording.

    Declaration
    public abstract void StartRecording()

    StopRecording()

    Stops the current recording.

    Declaration
    public abstract void StopRecording()

    UpdateDevice()

    Updates the internal state of the device.

    Declaration
    public abstract void UpdateDevice()

    Write(ITakeBuilder)

    Stores the recording into a take using a ITakeBuilder.

    Declaration
    public abstract void Write(ITakeBuilder takeBuilder)
    Parameters
    Type Name Description
    ITakeBuilder takeBuilder

    The take builder object.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023