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.
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. |