Class XRControllerRecording
The XRControllerRecording ScriptableObject stores position, rotation, and Interaction state changes from the XR Controller for playback.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
[CreateAssetMenu(menuName = "XR/XR Controller Recording")]
[Serializable]
[PreferBinarySerialization]
public class XRControllerRecording : ScriptableObject
Properties
duration
(Read Only) Total playback time for this recording.
Declaration
public double duration { get; }
Property Value
Type | Description |
---|---|
Double |
frames
(Read Only) Frames stored in this recording.
Declaration
public List<XRControllerState> frames { get; }
Property Value
Type | Description |
---|---|
List<XRControllerState> |
Methods
AddRecordingFrame(Double, Vector3, Quaternion, Boolean, Boolean, Boolean)
Declaration
public void AddRecordingFrame(double time, Vector3 position, Quaternion rotation, bool selectActive, bool activateActive, bool pressActive)
Parameters
Type | Name | Description |
---|---|---|
Double | time | |
Vector3 | position | |
Quaternion | rotation | |
Boolean | selectActive | |
Boolean | activateActive | |
Boolean | pressActive |
AddRecordingFrame(XRControllerState)
Declaration
public void AddRecordingFrame(XRControllerState state)
Parameters
Type | Name | Description |
---|---|---|
XRControllerState | state |
InitRecording()
Initializes this recording by clearing all frames stored.
Declaration
public void InitRecording()
SaveRecording()
Saves this recording and writes to disk.
Declaration
public void SaveRecording()