Class XRControllerRecording
The XRControllerRecording ScriptableObject stores position, rotation, and Interaction state changes from the XR Controller for playback.
Inherited Members
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
[CreateAssetMenu(menuName = "XR/XR Controller Recording")]
[Serializable]
[PreferBinarySerialization]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.4/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()
Explicit Interface Implementations
ISerializationCallbackReceiver.OnAfterDeserialize()
See OnAfterDeserialize.
Declaration
void ISerializationCallbackReceiver.OnAfterDeserialize()
Implements
ISerializationCallbackReceiver.OnBeforeSerialize()
See OnBeforeSerialize.
Declaration
void ISerializationCallbackReceiver.OnBeforeSerialize()