[XRI] Fix Missing XR UI Input Module References
Solution
Unity 2021.3.x - Unity 6.3.x
Published 26 days ago
Interaction with UI elements using ray and poke interactors is non-functional on hardware like the Meta Quest 2. This occurs because the XRUIInputModule lacks references to valid Starter Assets, specifically Input Action assets, even when a TrackedDeviceGraphicRaycaster is present on the Canvas.
The primary resolution for unresponsive UI interactions in XR involves importing the Starter Assets. This ensures all required components and references for XR UI input are correctly integrated into your project.
- Navigate to Window > Package Manager.
- Locate and select the
XR Interaction Toolkitpackage. - Expand the Samples dropdown within the package details.
- Click Import next to the Starter Assets entry.
- Select the
EventSystemGameObject in your scene. - On the
XRUIInputModulecomponent, assign the appropriate actions from the newly importedXRI Default Input Actionsasset to the corresponding input fields.
Additional Tips
- Confirm your
CanvasRender Mode is set toWorld Spacefor XR interactions. - Ensure the
TrackedDeviceGraphicRaycastercomponent is added to theCanvasand not theEventSystemitself. - Verify that the Starter Assets are properly added to the
Input Action Manageron yourXR OriginorXRI Default Input Actionsasset.
TL;DR
Importing the Starter Assets from the XR Interaction Toolkit provides the necessary Input Action Maps and presets to restore UI interactivity.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
Content inspired by a Unity discussion post.