Class XRControllerRecording
The XRController
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[CreateAssetMenu(menuName = "XR/XR Controller Recording")]
[Serializable]
[PreferBinarySerialization]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.1/api/UnityEngine.XR.Interaction.Toolkit.XRControllerRecording.html")]
public class XRControllerRecording : ScriptableObject, ISerializationCallbackReceiver
Properties
duration
(Read Only) Total playback time for this recording.
Declaration
public double duration { get; }
Property Value
Type | Description |
---|---|
double |
See Also
frames
(Read Only) Frames stored in this recording.
Declaration
public List<XRControllerState> frames { get; }
Property Value
Type | Description |
---|---|
List<XRController |
See Also
Methods
AddRecordingFrame(XRControllerState)
Adds a recording of a frame.
Duplicates the supplied state
object and adds the copy as a frame recording.
Declaration
public void AddRecordingFrame(XRControllerState state)
Parameters
Type | Name | Description |
---|---|---|
XRController |
state | The XRController |
See Also
AddRecordingFrameNonAlloc(XRControllerState)
Adds a recording of a frame.
Adds the supplied state
object as a frame recording; does not allocate new memory.
Declaration
public void AddRecordingFrameNonAlloc(XRControllerState state)
Parameters
Type | Name | Description |
---|---|---|
XRController |
state | The XRController |
See Also
InitRecording()
Initializes this recording by clearing all frames stored.
Declaration
public void InitRecording()
See Also
SaveRecording()
Saves this recording and writes to disk.
Declaration
public void SaveRecording()