docs.unity3d.com
    Show / Hide Table of Contents

    Class XRControllerRecording

    The XRControllerRecording stores position, rotation, and Interaction state changes from the XR Controller for playback.

    Inheritance
    Object
    XRControllerRecording
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    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)

    Adds a recording of a frame.

    Declaration
    public void AddRecordingFrame(double time, Vector3 position, Quaternion rotation, bool selectActive, bool activateActive, bool pressActive)
    Parameters
    Type Name Description
    Double time

    The time for this controller frame.

    Vector3 position

    The position for this controller frame.

    Quaternion rotation

    The rotation for this controller frame.

    Boolean selectActive

    Whether select is active or not.

    Boolean activateActive

    Whether activate is active or not.

    Boolean pressActive

    Whether press is active or not.

    AddRecordingFrame(XRControllerState)

    Adds a recording of a frame.

    Declaration
    public void AddRecordingFrame(XRControllerState state)
    Parameters
    Type Name Description
    XRControllerState state

    The XRControllerState to be recorded.

    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()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023