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.
Inherited Members
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
[ExecuteAlways]
[DisallowMultipleComponent]
public abstract class LiveCaptureDevice : MonoBehaviour
Properties
IsRecording
The recording state of the device.
Declaration
public bool IsRecording { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
IsReady()
Indicates whether a device is ready for recording.
Declaration
public abstract bool IsReady()
Returns
Type | Description |
---|---|
bool | true if ready for recording; otherwise, false. |
LiveUpdate()
Override this method to update the device during live mode.
Declaration
protected virtual void LiveUpdate()
Remarks
This method is called after the animation system execution and before the script's LateUpdate.
OnDisable()
The device calls this method when the device is about to get disabled.
Declaration
protected virtual void OnDisable()
Remarks
If you override this method, call the base method in your implementation.
OnEnable()
The device calls this method when the device is about to get enabled.
Declaration
protected virtual void OnEnable()
Remarks
If you override this method, call the base method in your implementation.
OnStartRecording()
The device calls this method when a new recording started.
Declaration
protected virtual void OnStartRecording()
OnStopRecording()
The device calls this method when the ongoing recording stopped.
Declaration
protected virtual void OnStopRecording()
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.
UpdateDevice()
Updates the internal state of the device.
Declaration
protected virtual void UpdateDevice()
Write(ITakeBuilder)
Stores the recording into a take using a ITake
Declaration
public abstract void Write(ITakeBuilder takeBuilder)
Parameters
Type | Name | Description |
---|---|---|
ITake |
takeBuilder | The take builder object. |