UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

ui

[XRI] Fix Missing XR UI Input Module References

Solution

user experienceinput systemvirtual realitypackagesXR

Unity 2021.3.x - Unity 6.3.x

Published 26 days ago

Issue

 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.

Explanation

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.

  1. Navigate to Window > Package Manager.
  2. Locate and select the XR Interaction Toolkit package.
  3. Expand the Samples dropdown within the package details.
  4. Click Import next to the Starter Assets entry.
  5. Select the EventSystem GameObject in your scene.
  6. On the XRUIInputModule component, assign the appropriate actions from the newly imported XRI Default Input Actions asset to the corresponding input fields.

Additional Tips

  • Confirm your Canvas Render Mode is set to World Space for XR interactions.
  • Ensure the TrackedDeviceGraphicRaycaster component is added to the Canvas and not the EventSystem itself.
  • Verify that the Starter Assets are properly added to the Input Action Manager on your XR Origin or XRI Default Input Actions asset.

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.