Class LiveStreamCaptureDevice
The base class for implementing a capture device that manages a LiveStream.
Inheritance
Inherited Members
Namespace: Unity.LiveCapture
Syntax
public abstract class LiveStreamCaptureDevice : LiveCaptureDevice
Properties
CurrentFrameTime
The current frame time and frame rate of the LiveStream.
Declaration
public FrameTimeWithRate? CurrentFrameTime { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<FrameTimeWithRate> |
FirstFrameTime
The time of the first recorded frame.
Declaration
protected double? FirstFrameTime { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<Double> |
Methods
BakeAnimationClip()
Generates an animation clip from the last recording.
Declaration
protected AnimationClip BakeAnimationClip()
Returns
| Type | Description |
|---|---|
| AnimationClip | An animation clip containing the last recording. |
CreateLiveProperties(LiveStream)
Override this method to create new properties to the specified LiveStream.
Declaration
protected virtual void CreateLiveProperties(LiveStream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| LiveStream | stream | The LiveStream to modify. |
LiveUpdate()
Override this method to update the device during live mode.
Declaration
protected override void LiveUpdate()
Overrides
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 override void OnDisable()
Overrides
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 override void OnEnable()
Overrides
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 override void OnStartRecording()
Overrides
ProcessFrame(LiveStream)
Override this method to process the specified LiveStream.
Declaration
protected abstract void ProcessFrame(LiveStream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| LiveStream | stream | The LiveStream to modify. |
RegisterLiveProperties()
Registers the values of the live properties to prevent Unity from marking Prefabs or the Scene as modified when you preview animations.
Declaration
protected void RegisterLiveProperties()
RestoreLiveProperties()
Restores the original values of any created live property.
Declaration
protected void RestoreLiveProperties()
UpdateStream(Transform, FrameTimeWithRate)
Updates the internal LiveStream.
Declaration
protected void UpdateStream(Transform root, FrameTimeWithRate frameTime)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | root | The root transform to bind. |
| FrameTimeWithRate | frameTime | The frame time to use for recording. |