Class FaceDevice
A device used to control face animation capture and playback.
Inherited Members
Namespace: Unity.LiveCapture.ARKitFaceCapture
Syntax
[ExcludeFromPreset]
[CreateDeviceMenuItem("ARKit Face Device", 0)]
[AddComponentMenu("Live Capture/ARKit Face Capture/ARKit Face Device")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.live-capture@4.0/manual/ref-component-arkit-face-device.html")]
public class FaceDevice : CompanionAppDevice<IFaceClient>, ICompanionAppDevice
Remarks
The face capture data is in the format of Apple's ARKit face tracking.
Properties
Actor
Gets the FaceActor currently assigned to this device.
Declaration
public FaceActor Actor { get; set; }
Property Value
| Type | Description |
|---|---|
| FaceActor | The assigned actor, or null if none is assigned. |
SyncBuffer
The synchronized data buffer.
Declaration
public ITimedDataSource SyncBuffer { get; }
Property Value
| Type | Description |
|---|---|
| ITimedDataSource |
Methods
GetAssetName()
Gets the name used for the take asset name.
Declaration
protected override string GetAssetName()
Returns
| Type | Description |
|---|---|
| String | The name of the asset. |
Overrides
IsReady()
Indicates whether a device is ready for recording.
Declaration
public override bool IsReady()
Returns
| Type | Description |
|---|---|
| Boolean | true if ready for recording; otherwise, false. |
Overrides
LiveUpdate()
Override this method to update the device during live mode.
Declaration
public override void LiveUpdate()
Overrides
Remarks
This method is called after the animation system execution and before the script's LateUpdate.
OnClientAssigned()
The device calls this method when a new client is assigned.
Declaration
protected override void OnClientAssigned()
Overrides
OnClientUnassigned()
The device calls this method when the client is unassigned.
Declaration
protected override void OnClientUnassigned()
Overrides
OnDisable()
This function is called when the behaviour becomes disabled.
Declaration
protected override void OnDisable()
Overrides
OnEnable()
This function is called when the object becomes enabled and active.
Declaration
protected override void OnEnable()
Overrides
OnRecordingChanged()
The device calls this method when the recording state has changed.
Declaration
protected override void OnRecordingChanged()
Overrides
OnRegisterLiveProperties(IPropertyPreviewer)
The device calls this method when a live performance starts and properties are about to change.
Declaration
protected override void OnRegisterLiveProperties(IPropertyPreviewer previewer)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyPreviewer | previewer | The IPropertyPreviewer to use to register live properties. |
Overrides
UpdateDevice()
Updates the internal state of the device.
Declaration
public override void UpdateDevice()
Overrides
Write(ITakeBuilder)
Stores the recording into a take using a ITakeBuilder.
Declaration
public override void Write(ITakeBuilder takeBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| ITakeBuilder | takeBuilder | The take builder object. |