Class XRControllerRecorder
Mono
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Debug/XR Controller Recorder", 11)]
[DisallowMultipleComponent]
[DefaultExecutionOrder(-30000)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.1/api/UnityEngine.XR.Interaction.Toolkit.XRControllerRecorder.html")]
public class XRControllerRecorder : MonoBehaviour
Properties
currentTime
(Read Only) The current recording/playback time.
Declaration
public double currentTime { get; }
Property Value
Type | Description |
---|---|
double |
See Also
duration
(Read Only) The total playback time (or 0 if no recording).
Declaration
public double duration { get; }
Property Value
Type | Description |
---|---|
double |
See Also
isPlaying
Whether the XRControllerRecorder is currently playing back interaction state.
Declaration
public bool isPlaying { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
isRecording
Whether the XRController
Declaration
public bool isRecording { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
playOnStart
Controls whether this recording will start playing when the component's Awake() method is called.
Declaration
public bool playOnStart { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
recording
Controller Recording asset for recording and playback of controller events.
Declaration
public XRControllerRecording recording { get; set; }
Property Value
Type | Description |
---|---|
XRController |
See Also
recordingStartTime
The time when recording was last started.
Declaration
protected float recordingStartTime { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
visitEachFrame
If true, every frame of the recording must be visited even if a larger time period has passed.
Declaration
public bool visitEachFrame { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
Methods
Awake()
See Mono
Declaration
protected void Awake()
See Also
GetControllerState(out XRControllerState)
Gets the state of the controller while playing or recording.
Declaration
public virtual bool GetControllerState(out XRControllerState controllerState)
Parameters
Type | Name | Description |
---|---|---|
XRController |
controllerState | When this method returns, contains the XRController |
Returns
See Also
GetInteractor()
Gets the interactor whose input will be recorded and played back.
Declaration
public IXRInteractor GetInteractor()
Returns
Type | Description |
---|---|
IXRInteractor | Returns the interactor whose input will be recorded and played back. |
See Also
OnDestroy()
See Mono
Declaration
protected void OnDestroy()
See Also
ResetPlayback()
Resets the recorder to the start of the clip.
Declaration
public void ResetPlayback()
See Also
SetInteractor(IXRInteractor)
Sets the interactor whose input will be recorded and played back.
Declaration
public void SetInteractor(IXRInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractor | interactor | The interactor whose input will be recorded and played back. |
Remarks
This also sets the serialized field to the given interactor as a Unity Object.
See Also
Update()
See Mono
Declaration
protected virtual void Update()