docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRInteractionSimulator

    A component which handles mouse and keyboard input from the user and uses it to simulate on-device interaction in XR Interaction Toolkit.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    XRInteractionSimulator
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [AddComponentMenu("XR/Debug/XR Interaction Simulator", 11)]
    [DefaultExecutionOrder(-29991)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.2/api/UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation.XRInteractionSimulator.html")]
    public class XRInteractionSimulator : MonoBehaviour
    Remarks

    This class does not directly manipulate the camera or controllers which are part of the XR Origin, but rather drives them indirectly through simulated input devices.

    Use the Package Manager window to install the XR Interaction Simulator sample into your project to get sample mouse and keyboard bindings for Input System actions that this component expects. The sample also includes a prefab of a GameObject with this component attached that has references to those sample actions already set. To make use of this simulator, add the prefab to your scene (the prefab makes use of InputActionManager to ensure the Input System actions are enabled).

    Note that the XR Origin must read the position and rotation of the HMD and controllers by using Input System actions (such as by using ActionBasedController and UnityEngine.InputSystem.XR.TrackedPoseDriver) for this simulator to work as expected. Attempting to use XR input subsystem device methods (such as by using XRController and UnityEngine.SpatialTracking.TrackedPoseDriver) will not work as expected since this simulator depends on the Input System to drive the simulated devices.

    Properties

    axis2DInput

    The input used to control the value of one or more 2D Axis controls on the manipulated controller device(s).

    Declaration
    public XRInputValueReader<Vector2> axis2DInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<Vector2>
    Remarks

    Typically bound to IJKL on a keyboard, and controls the primary and/or secondary 2D Axis controls on them.

    axis2DTargets

    One or more 2D Axis controls that keyboard input should apply to (or none).

    Declaration
    public Axis2DTargets axis2DTargets { get; set; }
    Property Value
    Type Description
    Axis2DTargets
    Remarks

    Used to control a combination of the position (Position), primary 2D axis (Primary2DAxis), or secondary 2D axis (Secondary2DAxis) of manipulated device(s).

    See Also
    translateXInput
    translateYInput
    translateZInput
    axis2DInput

    bodyTranslateMultiplier

    Speed multiplier applied for body translation when triggered by input.

    Declaration
    public float bodyTranslateMultiplier { get; set; }
    Property Value
    Type Description
    float
    See Also
    translateXSpeed
    translateYSpeed
    translateZSpeed

    cameraTransform

    The Transform that contains the Camera. This is usually the "Head" of XR Origins. Automatically set to main if unset.

    Declaration
    public Transform cameraTransform { get; set; }
    Property Value
    Type Description
    Transform

    controllerInputMode

    The controller input mode which the controller should currently simulate.

    Declaration
    public ControllerInputMode controllerInputMode { get; }
    Property Value
    Type Description
    ControllerInputMode

    currentHandExpression

    The hand expression which the simulated hands should currently simulate.

    Declaration
    public SimulatedHandExpression currentHandExpression { get; }
    Property Value
    Type Description
    SimulatedHandExpression

    cycleDevicesInput

    The input used to cycle between the different available devices.

    Declaration
    public XRInputButtonReader cycleDevicesInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    cycleQuickActionInput

    The input used to cycle the quick-action for controller inputs or hand expressions.

    Declaration
    public XRInputButtonReader cycleQuickActionInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    togglePerformQuickActionInput

    deviceLifecycleManager

    The corresponding manager for this simulator that handles the lifecycle of the simulated devices.

    Declaration
    public SimulatedDeviceLifecycleManager deviceLifecycleManager { get; set; }
    Property Value
    Type Description
    SimulatedDeviceLifecycleManager
    Remarks

    If this value is not set, the simulator will either find a lifecycle manager in the scene or create one.

    gripAmount

    The amount of the simulated grip on the controller when the Grip control is pressed.

    Declaration
    public float gripAmount { get; set; }
    Property Value
    Type Description
    float
    See Also
    gripInput

    gripInput

    The input used to control the Grip control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader gripInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    handExpressionManager

    The corresponding manager for this simulator that handles the hand expressions.

    Declaration
    public SimulatedHandExpressionManager handExpressionManager { get; set; }
    Property Value
    Type Description
    SimulatedHandExpressionManager
    Remarks

    If this value is not set, the simulator will either find a hand expression manager in the scene or create one.

    hmdIsTracked

    Whether the HMD should report the pose as fully tracked or unavailable/inferred.

    Declaration
    public bool hmdIsTracked { get; set; }
    Property Value
    Type Description
    bool

    hmdTrackingState

    Which tracking values the HMD should report as being valid or meaningful to use, which could mean either tracked or inferred.

    Declaration
    public InputTrackingState hmdTrackingState { get; set; }
    Property Value
    Type Description
    InputTrackingState

    instance

    The runtime instance of the XR Interaction Simulator.

    Declaration
    public static XRInteractionSimulator instance { get; }
    Property Value
    Type Description
    XRInteractionSimulator

    interactionSimulatorUI

    The optional Interaction Simulator UI prefab to use along with the XR Interaction Simulator.

    Declaration
    public GameObject interactionSimulatorUI { get; set; }
    Property Value
    Type Description
    GameObject

    keyboardRotationDeltaInput

    The keyboard input used to rotate by a scaled amount along or about the x- and y-axes.

    Declaration
    public XRInputValueReader<Vector2> keyboardRotationDeltaInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<Vector2>

    leftControllerIsTracked

    Whether the left-hand controller should report the pose as fully tracked or unavailable/inferred.

    Declaration
    public bool leftControllerIsTracked { get; set; }
    Property Value
    Type Description
    bool

    leftControllerTrackingState

    Which tracking values the left-hand controller should report as being valid or meaningful to use, which could mean either tracked or inferred.

    Declaration
    public InputTrackingState leftControllerTrackingState { get; set; }
    Property Value
    Type Description
    InputTrackingState

    leftDeviceActionsInput

    The input used for controlling the left-hand device's actions for buttons or hand expressions.

    Declaration
    public XRInputButtonReader leftDeviceActionsInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    leftHandIsTracked

    Whether the left hand should report the pose as fully tracked or unavailable/inferred.

    Declaration
    public bool leftHandIsTracked { get; set; }
    Property Value
    Type Description
    bool

    manipulatingFPS

    Whether the simulator is manipulating the HMD, Left Controller, and Right Controller as if the whole player was turning their torso, similar to a typical FPS style.

    Declaration
    public bool manipulatingFPS { get; }
    Property Value
    Type Description
    bool

    manipulatingHMD

    Whether the simulator is manipulating the HMD.

    Declaration
    public bool manipulatingHMD { get; }
    Property Value
    Type Description
    bool

    manipulatingLeftController

    Whether the simulator is manipulating the Left Controller.

    Declaration
    public bool manipulatingLeftController { get; }
    Property Value
    Type Description
    bool

    manipulatingLeftDevice

    Whether the simulator is manipulating the Left device (controller or hand).

    Declaration
    public bool manipulatingLeftDevice { get; }
    Property Value
    Type Description
    bool

    manipulatingLeftHand

    Whether the simulator is manipulating the Left Hand.

    Declaration
    public bool manipulatingLeftHand { get; }
    Property Value
    Type Description
    bool

    manipulatingRightController

    Whether the simulator is manipulating the Right Controller.

    Declaration
    public bool manipulatingRightController { get; }
    Property Value
    Type Description
    bool

    manipulatingRightDevice

    Whether the simulator is manipulating the Right device (controller or hand).

    Declaration
    public bool manipulatingRightDevice { get; }
    Property Value
    Type Description
    bool

    manipulatingRightHand

    Whether the simulator is manipulating the Right Hand.

    Declaration
    public bool manipulatingRightHand { get; }
    Property Value
    Type Description
    bool

    menuInput

    The input used to control the Menu control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader menuInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    mouseRotationDeltaInput

    The mouse input used to rotate by a scaled amount along or about the x- and y-axes.

    Declaration
    public XRInputValueReader<Vector2> mouseRotationDeltaInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<Vector2>
    Remarks

    Typically bound to the screen-space motion delta of the mouse in pixels.

    See Also
    keyboardRotationDeltaInput

    mouseScrollInput

    The input used to translate or rotate by a scaled amount along or about the z-axis.

    Declaration
    public XRInputValueReader<Vector2> mouseScrollInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<Vector2>
    Remarks

    Typically bound to the horizontal and vertical scroll wheels, though only the vertical is used.

    mouseScrollRotateSensitivity

    Sensitivity of rotation along the z-axis (roll) when triggered by mouse scroll input.

    Declaration
    public float mouseScrollRotateSensitivity { get; set; }
    Property Value
    Type Description
    float
    See Also
    mouseScrollInput
    rotateXSensitivity
    rotateYSensitivity

    primary2DAxisClickInput

    The input used to control the Primary2DAxisClick control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader primary2DAxisClickInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    primary2DAxisTouchInput

    The input used to control the Primary2DAxisTouch control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader primary2DAxisTouchInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    primaryButtonInput

    The input used to control the PrimaryButton control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader primaryButtonInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    primaryTouchInput

    The input used to control the PrimaryTouch control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader primaryTouchInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    quickActionControllerInputModes

    The subset of quick-action controller buttons/inputs that a user can shift through in the simulator.

    Declaration
    public List<ControllerInputMode> quickActionControllerInputModes { get; set; }
    Property Value
    Type Description
    List<ControllerInputMode>
    See Also
    cycleQuickActionInput
    togglePerformQuickActionInput

    resetInput

    The input used to cause the manipulated device(s) to reset position or rotation

    Declaration
    public XRInputButtonReader resetInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    Remarks

    Resets position to zero and rotation to identity. May be combined with axis constraints (xConstraintInput, yConstraintInput, and zConstraintInput).

    rightControllerIsTracked

    Whether the right-hand controller should report the pose as fully tracked or unavailable/inferred.

    Declaration
    public bool rightControllerIsTracked { get; set; }
    Property Value
    Type Description
    bool

    rightControllerTrackingState

    Which tracking values the right-hand controller should report as being valid or meaningful to use, which could mean either tracked or inferred.

    Declaration
    public InputTrackingState rightControllerTrackingState { get; set; }
    Property Value
    Type Description
    InputTrackingState

    rightHandIsTracked

    Whether the right hand should report the pose as fully tracked or unavailable/inferred.

    Declaration
    public bool rightHandIsTracked { get; set; }
    Property Value
    Type Description
    bool

    rotateXSensitivity

    Sensitivity of rotation along the x-axis (pitch) when triggered by input.

    Declaration
    public float rotateXSensitivity { get; set; }
    Property Value
    Type Description
    float
    See Also
    rotateYSensitivity
    mouseScrollRotateSensitivity

    rotateYInvert

    A boolean value of whether to invert the y-axis of mouse input when rotating. A false value (default) means typical FPS style where moving up/down pitches up/down. A true value means flight control style where moving up/down pitches down/up.

    Declaration
    public bool rotateYInvert { get; set; }
    Property Value
    Type Description
    bool

    rotateYSensitivity

    Sensitivity of rotation along the y-axis (yaw) when triggered by input.

    Declaration
    public float rotateYSensitivity { get; set; }
    Property Value
    Type Description
    float
    See Also
    rotateXSensitivity
    mouseScrollRotateSensitivity

    secondary2DAxisClickInput

    The input used to control the Secondary2DAxisClick control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader secondary2DAxisClickInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    secondary2DAxisTouchInput

    The input used to control the Secondary2DAxisTouch control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader secondary2DAxisTouchInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    secondaryButtonInput

    The input used to control the SecondaryButton control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader secondaryButtonInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    secondaryTouchInput

    The input used to control the SecondaryTouch control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader secondaryTouchInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    targetedDeviceInput

    The currently active/targeted devices in the interaction simulator.

    Declaration
    public TargetedDevices targetedDeviceInput { get; set; }
    Property Value
    Type Description
    TargetedDevices

    toggleManipulateHeadInput

    The input used to toggle manipulation of only the head pose.

    Declaration
    public XRInputButtonReader toggleManipulateHeadInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    toggleManipulateLeftInput

    The input used to toggle enable manipulation of the left-hand controller when pressed.

    Declaration
    public XRInputButtonReader toggleManipulateLeftInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    toggleManipulateRightInput

    toggleManipulateRightInput

    The input used to toggle enable manipulation of the right-hand controller when pressed.

    Declaration
    public XRInputButtonReader toggleManipulateRightInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    toggleManipulateLeftInput

    toggleMouseInput

    The input used to toggle associated inputs from a mouse device.

    Declaration
    public XRInputButtonReader toggleMouseInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    mouseRotationDeltaInput
    mouseScrollInput

    togglePerformQuickActionInput

    The input used to perform the currently active quick-action controller input or hand expression.

    Declaration
    public XRInputButtonReader togglePerformQuickActionInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    cycleQuickActionInput

    togglePrimary2DAxisTargetInput

    The input used to toggle enable manipulation of the Primary2DAxis of the controllers when pressed.

    Declaration
    public XRInputButtonReader togglePrimary2DAxisTargetInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    toggleSecondary2DAxisTargetInput
    axis2DInput

    toggleSecondary2DAxisTargetInput

    The input used to toggle enable manipulation of the Secondary2DAxis of the controllers when pressed.

    Declaration
    public XRInputButtonReader toggleSecondary2DAxisTargetInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    togglePrimary2DAxisTargetInput

    translateSpace

    The coordinate space in which translation should operate.

    Declaration
    public Space translateSpace { get; set; }
    Property Value
    Type Description
    Space

    translateXInput

    The input used to translate in the x-axis (left/right) while held.

    Declaration
    public XRInputValueReader<float> translateXInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<float>

    translateXSpeed

    Speed of translation in the x-axis (left/right) when triggered by input.

    Declaration
    public float translateXSpeed { get; set; }
    Property Value
    Type Description
    float
    See Also
    translateXInput
    translateYSpeed
    translateZSpeed

    translateYInput

    The input used to translate in the y-axis (up/down) while held.

    Declaration
    public XRInputValueReader<float> translateYInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<float>

    translateYSpeed

    Speed of translation in the y-axis (up/down) when triggered by input.

    Declaration
    public float translateYSpeed { get; set; }
    Property Value
    Type Description
    float
    See Also
    translateYInput
    translateXSpeed
    translateZSpeed

    translateZInput

    The input used to translate in the z-axis (forward/back) while held.

    Declaration
    public XRInputValueReader<float> translateZInput { get; set; }
    Property Value
    Type Description
    XRInputValueReader<float>

    translateZSpeed

    Speed of translation in the z-axis (forward/back) when triggered by input.

    Declaration
    public float translateZSpeed { get; set; }
    Property Value
    Type Description
    float
    See Also
    translateZInput
    translateXSpeed
    translateYSpeed

    triggerAmount

    The amount of the simulated trigger pull on the controller when the Trigger control is pressed.

    Declaration
    public float triggerAmount { get; set; }
    Property Value
    Type Description
    float
    See Also
    triggerInput

    triggerInput

    The input used to control the Trigger control of the manipulated controller device(s).

    Declaration
    public XRInputButtonReader triggerInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader

    xConstraintInput

    The input used to constrain the translation or rotation to the x-axis when moving the mouse or resetting. May be combined with another axis constraint to constrain to a plane.

    Declaration
    public XRInputButtonReader xConstraintInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    yConstraintInput
    zConstraintInput

    yConstraintInput

    The input used to constrain the translation or rotation to the y-axis when moving the mouse or resetting. May be combined with another axis constraint to constrain to a plane.

    Declaration
    public XRInputButtonReader yConstraintInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    xConstraintInput
    zConstraintInput

    zConstraintInput

    The input used to constrain the translation or rotation to the z-axis when moving the mouse or resetting. May be combined with another axis constraint to constrain to a plane.

    Declaration
    public XRInputButtonReader zConstraintInput { get; set; }
    Property Value
    Type Description
    XRInputButtonReader
    See Also
    xConstraintInput
    yConstraintInput

    Methods

    Awake()

    See MonoBehaviour.

    Declaration
    protected virtual void Awake()

    GetResetScale()

    Gets a Vector3 that can be multiplied component-wise with another Vector3 to reset components of the Vector3, based on axis constraint inputs.

    Declaration
    protected Vector3 GetResetScale()
    Returns
    Type Description
    Vector3

    Returns a Vector3 mask used to reset the components of another Vector3.

    See Also
    resetInput
    xConstraintInput
    yConstraintInput
    zConstraintInput

    OnDestroy()

    See MonoBehaviour.

    Declaration
    protected virtual void OnDestroy()

    OnDisable()

    See MonoBehaviour.

    Declaration
    protected virtual void OnDisable()

    OnEnable()

    See MonoBehaviour.

    Declaration
    protected virtual void OnEnable()

    ProcessAnalogButtonControlInput(ref XRSimulatedControllerState)

    Update the state of manipulated controller device related to analog values only. This is used to adjust the grip and trigger values when the user adjusts the slider when not manipulating the device.

    Declaration
    protected virtual void ProcessAnalogButtonControlInput(ref XRSimulatedControllerState controllerState)
    Parameters
    Type Name Description
    XRSimulatedControllerState controllerState

    The controller state that will be processed.

    ProcessAxis2DControlInput(ref XRSimulatedControllerState)

    Process input from the user and update the state of manipulated controller device(s) related to 2D Axis input controls.

    Declaration
    protected virtual void ProcessAxis2DControlInput(ref XRSimulatedControllerState controllerState)
    Parameters
    Type Name Description
    XRSimulatedControllerState controllerState

    ProcessButtonControlInput(ref XRSimulatedControllerState)

    Process input from the user and update the state of manipulated controller device(s) related to button input controls.

    Declaration
    protected virtual void ProcessButtonControlInput(ref XRSimulatedControllerState controllerState)
    Parameters
    Type Name Description
    XRSimulatedControllerState controllerState

    The controller state that will be processed.

    ProcessControlInput()

    Process input from the user and update the state of manipulated controller device(s) related to input controls.

    Declaration
    protected virtual void ProcessControlInput()

    ProcessPoseInput()

    Process input from the user and update the state of manipulated device(s) related to position and rotation.

    Declaration
    protected virtual void ProcessPoseInput()

    ReadInputValues()

    Reads any new values from the input readers and applies it to the corresponding value or state properties for further processing.

    Declaration
    protected virtual void ReadInputValues()

    Update()

    See MonoBehaviour.

    Declaration
    protected virtual void Update()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)