docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRUIInputModule

    Custom class for input modules that send UI input in XR.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    UIBehaviour
    BaseInputModule
    UIInputModule
    XRUIInputModule
    Inherited Members
    UIInputModule.finalizeRaycastResults
    UIInputModule.pointerEnter
    UIInputModule.pointerExit
    UIInputModule.pointerDown
    UIInputModule.pointerUp
    UIInputModule.pointerClick
    UIInputModule.pointerMove
    UIInputModule.initializePotentialDrag
    UIInputModule.beginDrag
    UIInputModule.drag
    UIInputModule.endDrag
    UIInputModule.drop
    UIInputModule.scroll
    UIInputModule.updateSelected
    UIInputModule.move
    UIInputModule.submit
    UIInputModule.cancel
    UIInputModule.clickSpeed
    UIInputModule.moveDeadzone
    UIInputModule.repeatDelay
    UIInputModule.repeatRate
    UIInputModule.trackedDeviceDragThresholdMultiplier
    UIInputModule.trackedScrollDeltaMultiplier
    UIInputModule.uiCamera
    UIInputModule.Update()
    UIInputModule.Process()
    UIInputModule.SendUpdateEventToSelectedObject()
    UIInputModule.ActivateModule()
    UIInputModule.GetCurrentGameObject(int)
    UIInputModule.IsPointerOverGameObject(int)
    BaseInputModule.m_RaycastResultCache
    BaseInputModule.m_InputOverride
    BaseInputModule.FindFirstRaycast(List<RaycastResult>)
    BaseInputModule.DetermineMoveDirection(float, float)
    BaseInputModule.DetermineMoveDirection(float, float, float)
    BaseInputModule.FindCommonRoot(GameObject, GameObject)
    BaseInputModule.HandlePointerExitAndEnter(PointerEventData, GameObject)
    BaseInputModule.GetAxisEventData(float, float, float)
    BaseInputModule.GetBaseEventData()
    BaseInputModule.ShouldActivateModule()
    BaseInputModule.DeactivateModule()
    BaseInputModule.UpdateModule()
    BaseInputModule.IsModuleSupported()
    BaseInputModule.ConvertUIToolkitPointerId(PointerEventData)
    BaseInputModule.input
    BaseInputModule.inputOverride
    BaseInputModule.eventSystem
    UIBehaviour.Awake()
    UIBehaviour.Start()
    UIBehaviour.OnDestroy()
    UIBehaviour.IsActive()
    UIBehaviour.OnValidate()
    UIBehaviour.Reset()
    UIBehaviour.OnRectTransformDimensionsChange()
    UIBehaviour.OnBeforeTransformParentChanged()
    UIBehaviour.OnTransformParentChanged()
    UIBehaviour.OnDidApplyAnimationProperties()
    UIBehaviour.OnCanvasGroupChanged()
    UIBehaviour.OnCanvasHierarchyChanged()
    UIBehaviour.IsDestroyed()
    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.UI
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [AddComponentMenu("Event/XR UI Input Module", 11)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.UI.XRUIInputModule.html")]
    public class XRUIInputModule : UIInputModule

    Properties

    activeInputMode

    Configures which Active Input Mode will be used in the situation where the Active Input Handling project setting is set to Both.

    Declaration
    public XRUIInputModule.ActiveInputMode activeInputMode { get; set; }
    Property Value
    Type Description
    XRUIInputModule.ActiveInputMode
    See Also
    XRUIInputModule.ActiveInputMode

    cancelAction

    The Input System action to use for cancelling or backing out of a UI element. Must be a UnityEngine.InputSystem.Controls.ButtonControl Control.

    Declaration
    public InputActionReference cancelAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    cancelButton

    Name of the gamepad/joystick button to use for UI cancel or back commands when using the old Input Manager.

    Declaration
    public string cancelButton { get; set; }
    Property Value
    Type Description
    string

    enableBuiltinActionsAsFallback

    When enabled, built-in Input System actions will be used if no Input System UI Actions are assigned. This uses the currently enabled Input System devices: UnityEngine.InputSystem.Mouse.current, UnityEngine.InputSystem.Gamepad.current, and UnityEngine.InputSystem.Joystick.current.

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

    enableGamepadInput

    If true, will forward gamepad data to UI elements.

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

    enableJoystickInput

    If true, will forward joystick data to UI elements.

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

    enableMouseInput

    If true, will forward 2D mouse data to UI elements.

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

    enableTouchInput

    If true, will forward 2D touch data to UI elements.

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

    enableXRInput

    If true, will forward 3D tracked device data to UI elements.

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

    horizontalAxis

    Name of the horizontal axis for UI navigation when using the old Input Manager.

    Declaration
    public string horizontalAxis { get; set; }
    Property Value
    Type Description
    string

    leftClickAction

    The Input System action to use to determine whether the left button of a pointer is pressed. Must be a UnityEngine.InputSystem.Controls.ButtonControl Control.

    Declaration
    public InputActionReference leftClickAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    middleClickAction

    The Input System action to use to determine whether the middle button of a pointer is pressed. Must be a UnityEngine.InputSystem.Controls.ButtonControl Control.

    Declaration
    public InputActionReference middleClickAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    navigateAction

    The Input System action to use to navigate the currently active UI. Must be a UnityEngine.InputSystem.Controls.Vector2Control Control.

    Declaration
    public InputActionReference navigateAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    pointAction

    The Input System action to use to move the pointer on the currently active UI. Must be a UnityEngine.InputSystem.Controls.Vector2Control Control.

    Declaration
    public InputActionReference pointAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    rightClickAction

    The Input System action to use to determine whether the right button of a pointer is pressed. Must be a UnityEngine.InputSystem.Controls.ButtonControl Control.

    Declaration
    public InputActionReference rightClickAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    scrollWheelAction

    The Input System action to use to move the pointer on the currently active UI. Must be a UnityEngine.InputSystem.Controls.Vector2Control Control.

    Declaration
    public InputActionReference scrollWheelAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    submitAction

    The Input System action to use for submitting or activating a UI element. Must be a UnityEngine.InputSystem.Controls.ButtonControl Control.

    Declaration
    public InputActionReference submitAction { get; set; }
    Property Value
    Type Description
    InputActionReference

    submitButton

    Name of the gamepad/joystick button to use for UI selection or submission when using the old Input Manager.

    Declaration
    public string submitButton { get; set; }
    Property Value
    Type Description
    string

    verticalAxis

    Name of the vertical axis for UI navigation when using the old Input Manager.

    Declaration
    public string verticalAxis { get; set; }
    Property Value
    Type Description
    string

    Methods

    DoProcess()

    Process the current tick for the module.

    Declaration
    protected override void DoProcess()
    Overrides
    UIInputModule.DoProcess()
    Remarks

    Executed once per Update call. Override for custom processing.

    See Also
    Process()

    GetInteractor(int)

    Gets an IUIInteractor from its corresponding Unity UI Pointer Id. This can be used to identify individual Interactors from the underlying UI Events.

    Declaration
    public IUIInteractor GetInteractor(int pointerId)
    Parameters
    Type Name Description
    int pointerId

    A unique integer representing an object that can point at UI.

    Returns
    Type Description
    IUIInteractor

    Returns the interactor associated with pointerId. Returns null if no Interactor is associated (e.g. if it's a mouse event).

    GetTrackedDeviceModel(IUIInteractor, out TrackedDeviceModel)

    Retrieves the UI Model for a selected IUIInteractor.

    Declaration
    public bool GetTrackedDeviceModel(IUIInteractor interactor, out TrackedDeviceModel model)
    Parameters
    Type Name Description
    IUIInteractor interactor

    The IUIInteractor you want the model for.

    TrackedDeviceModel model

    The returned model that reflects the UI state of the interactor.

    Returns
    Type Description
    bool

    Returns true if the model was able to retrieved. Otherwise, returns false.

    OnDisable()

    See MonoBehavior.OnDisable.

    Declaration
    protected override void OnDisable()
    Overrides
    BaseInputModule.OnDisable()

    OnEnable()

    See MonoBehavior.OnEnable.

    Declaration
    protected override void OnEnable()
    Overrides
    BaseInputModule.OnEnable()

    RegisterInteractor(IUIInteractor)

    Register an IUIInteractor with the UI system. Calling this will enable it to start interacting with UI.

    Declaration
    public void RegisterInteractor(IUIInteractor interactor)
    Parameters
    Type Name Description
    IUIInteractor interactor

    The IUIInteractor to use.

    UnregisterInteractor(IUIInteractor)

    Unregisters an IUIInteractor with the UI system. This cancels all UI Interaction and makes the IUIInteractor no longer able to affect UI.

    Declaration
    public void UnregisterInteractor(IUIInteractor interactor)
    Parameters
    Type Name Description
    IUIInteractor interactor

    The IUIInteractor to stop using.

    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)