Class XRUIInputModule
Custom class for input modules that send UI input in XR.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.UI
Assembly: solution.dll
Syntax
[AddComponentMenu("Event/XR UI Input Module", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.UI.XRUIInputModule.html")]
public class XRUIInputModule : UIInputModule
Properties
| Name | Description |
|---|---|
| activeInputMode | Configures which Active Input Mode will be used in the situation where the Active Input Handling project setting is set to Both. |
| cancelAction | The Input System action to use for cancelling or backing out of a UI element. Must be a ButtonControl Control. |
| cancelButton | Name of the gamepad/joystick button to use for UI cancel or back commands when using the old Input Manager. |
| 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. |
| enableGamepadInput | If true, will forward gamepad data to UI elements. |
| enableJoystickInput | If true, will forward joystick data to UI elements. |
| enableMouseInput | If true, will forward 2D mouse data to UI elements. |
| enableTouchInput | If true, will forward 2D touch data to UI elements. |
| enableXRInput | If true, will forward 3D tracked device data to UI elements. |
| horizontalAxis | Name of the horizontal axis for UI navigation when using the old Input Manager. |
| leftClickAction | The Input System action to use to determine whether the left button of a pointer is pressed. Must be a ButtonControl Control. |
| middleClickAction | The Input System action to use to determine whether the middle button of a pointer is pressed. Must be a ButtonControl Control. |
| navigateAction | The Input System action to use to navigate the currently active UI. Must be a Vector2Control Control. |
| pointAction | The Input System action to use to move the pointer on the currently active UI. Must be a Vector2Control Control. |
| rightClickAction | The Input System action to use to determine whether the right button of a pointer is pressed. Must be a ButtonControl Control. |
| scrollWheelAction | The Input System action to use to move the pointer on the currently active UI. Must be a Vector2Control Control. |
| submitAction | The Input System action to use for submitting or activating a UI element. Must be a ButtonControl Control. |
| submitButton | Name of the gamepad/joystick button to use for UI selection or submission when using the old Input Manager. |
| verticalAxis | Name of the vertical axis for UI navigation when using the old Input Manager. |
Methods
| Name | Description |
|---|---|
| DoProcess() | Process the current tick for the module. |
| 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. |
| GetTrackedDeviceModel(IUIInteractor, out TrackedDeviceModel) | Retrieves the UI Model for a selected IUIInteractor. |
| OnDisable() | |
| OnEnable() | |
| RegisterInteractor(IUIInteractor) | Register an IUIInteractor with the UI system. Calling this will enable it to start interacting with UI. |
| UnregisterInteractor(IUIInteractor) | Unregisters an IUIInteractor with the UI system. This cancels all UI Interaction and makes the IUIInteractor no longer able to affect UI. |