Class XRControllerRecorder
MonoBehaviour that controls interaction recording and playback (via XRControllerRecording assets).
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Debug/XR Controller Recorder", 11)]
[DisallowMultipleComponent]
[DefaultExecutionOrder(-30000)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.XRControllerRecorder.html")]
public class XRControllerRecorder : MonoBehaviour
Properties
| Name | Description |
|---|---|
| currentTime | (Read Only) The current recording/playback time. |
| duration | (Read Only) The total playback time (or 0 if no recording). |
| isPlaying | Whether the XRControllerRecorder is currently playing back interaction state. |
| isRecording | Whether the XRControllerRecorder is currently recording interaction state. |
| playOnStart | Controls whether this recording will start playing when the component's Awake() method is called. |
| recording | Controller Recording asset for recording and playback of controller events. |
| recordingStartTime | The time when recording was last started. |
| visitEachFrame | If true, every frame of the recording must be visited even if a larger time period has passed. |
Methods
| Name | Description |
|---|---|
| Awake() | See MonoBehaviour. |
| GetControllerState(out XRControllerState) | Gets the state of the controller while playing or recording. |
| GetInteractor() | Gets the interactor whose input will be recorded and played back. |
| OnDestroy() | See MonoBehaviour. |
| ResetPlayback() | Resets the recorder to the start of the clip. |
| SetInteractor(IXRInteractor) | Sets the interactor whose input will be recorded and played back. |
| Update() | See MonoBehaviour. |