Class XRControllerRecording
The XRControllerRecording ScriptableObject stores position, rotation, and Interaction state changes from the XR Controller for playback.
Implements
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
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@2.5/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 |
frames
(Read Only) Frames stored in this recording.
Declaration
public List<XRControllerState> frames { get; }
Property Value
Type | Description |
---|---|
List<XRControllerState> |
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 |
---|---|---|
XRControllerState | state | The XRControllerState to be recorded. |
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 |
---|---|---|
XRControllerState | state | The XRControllerState to be recorded. |
See Also
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()