Controllers in VR not interacting with UI button

I’m very new to Unity and am building a VR app for a HTC Vive HMD. I am using Unity version 2022.3.27 with XR Interaction Toolkit (3.0.3), XR Plugin Management (4.4.1) and OpenXR Plugin (1.11.0). I have followed tutorials for the correct build settings (for Android), so they should all be correct.

All I’m trying to do right now is press a button with a VR controller. In the headset, the controllers are there and the panel is visible but nothing is happening when I hover over a button with the raycast, or when I pull the trigger. I’m not sure if I’ve missed a step - here is everything I have added:

XR rig

  • Cam offset
  • Main camera
  • Left controller + XR controller (action-based) with XRI default prefab + XR ray interaction with XR interaction manager added.
  • Right controller (same as above for right)

XR interaction manager

Input action manager + XRI default input actions

UI canvas + render set to worldspace

  • Panel
  • 3 buttons + each should change colour when hovered or pressed + interactable enabled

I don’t know what else to check for. Does the button need a Graphic Raycaster or a Box Collider? Or is it my controller missing a setting? I feel like I’ve tried all these things so not sure what I’m missing.

I appreciate any help you can give me!!

PS I have removed my onclick event for now, so I could work out what the problem was with buttons/controllers (as I should be able to see the button change colour when I hover/press it, so I don’t think the issue is with the onclick event).

I might have found the reason… but I can’t fix it.

In the XRI default action map > XRI right hand interaction > actions options - there is a warning under binding telling me there are no OpenXR interaction profiles enabled.

In project settings > XR Plug-in Management > OpenXR - under Android, I only have the VIVE Focus 3 Controller Interaction enabled, as the HTC Vive Controller Profile does not appear as an option (although it does under Windows Settings). I think this might be the issue, but I don’t know how to rectify this.

Does anyone agree that this is the issue and know how to fix it?

Thanks in advance!

If you open the XRI Default Input Actions asset and look at XRI Left Interaction or XRI Right Interaction maps, the UI Press and UI Press Value actions should have bindings. The first one in each (TriggerButton and Trigger) should show VIVE Focus 3 Controller (OpenXR) > triggerPressed or VIVE Focus 3 Controller (OpenXR) > trigger under the Derived Bindings. If you’re not seeing them, you’ll need to add VIVE Focus 3 Controller (OpenXR) to the list in Edit > Project Settings > XR Plug-in Management > OpenXR under the Android tab.

If that’s set up correctly, you’ll need to make sure:

  • Your XR Ray Interactor has UI Interaction enabled.
  • Your Canvas has a Tracked Device Graphic Raycaster component added.
  • Your EventSystem GameObject has the XR UI Input Module component added.

After that, the interactor needs to have a reference to the input actions for doing UI Press. It looks like you are making use of deprecated components, so in your current setup you should make sure on the XR Controller (Action-based) (Deprecated) component that UI Press Action and UI Press Action Value are both set to the UI Press and UI Press Value actions. When that XR Controller (Action-based) component is present, the XR Ray Interactor will use those values instead of the UI Press Input property on the XR Ray Interactor itself.

But since you are on XR Interaction Toolkit 3.0, it might be better for you to update your scene to use the XR Origin (XR Rig) prefab in the Starter Assets sample that you can install from the Package Manager window. It also has a DemoScene that you can use which should have UI set up correctly that you can test with your project.

You could also try to refer to the Basic Input for OpenXR docs on the VIVE website which may help.

Hi Chris,

Thanks so much for your response. I created a new project from scratch and used the prefabs from the DemoScene which interacts with the UI in Playmode.

However, I’m not sure if something is still wrong. In Project Settings > XR Plug-in Management > OpenXR under Android Tab, I have VIVE Focus 3 Controller Interaction enabled under Interaction Profiles. But in the XRI Default Input Actions in UI Press and UI Press Value, under Binding there is a warning which says ‘This binding will be inactive because there are no enabled OpenXR interactions profiles’… even though in Android the interaction profile is set to VIVE Focus 3 as I just mentioned. Also, under Derived Bindings, ‘VIVE Focus 3 Controller (OpenXR) > triggerPressed’ is present (along with options for oculus, XR simulated, and meta quest).

When I checked the ActionMap earlier this warning under binding was not present, so I’m not sure why it is now.

Does this sound like a problem to you? I’m not sure what to do about it.

You may need to go to File > Build Settings and select Android and then Switch Platform if you’re currently on Windows, Mac, Linux instead. I think the warnings that appear in the input action editor for the bindings are based on the current platform.

Can you post a screenshot of your UI Press and UI Press Value input actions with the bindings foldout expanded and your OpenXR settings in Edit > Project Settings > XR Plug-in Management > OpenXR if you’re still seeing problems?

Hi Chris,

Yes, the platform is set to Android. I have attached two screenshots of 1) UI Press, 2) UI Press Value input actions, 3) OpenXR in project settings, and 4) current build settings.

I really appreciate your time, thanks.




It appears that there are two different bugs causing the behavior with the Warning icon that you are seeing. The OpenXR package is incorrectly basing the warning status on the last time the Enabled Interaction Profiles list changed with the currently selected tab in the window instead of based on your active build target.

However even if you manually refreshed it to work around the bug by removing it from Android and then re-adding it to the list, there is a bug in HTC’s code where they aren’t returning a correct string in the GetDeviceLayoutName method. So the warning will always appear even if you have the VIVE Focus 3 Controller Interaction enabled.

So you can safely ignore the warning about “This binding will be inactive because there are no enabled OpenXR interaction profiles.” I’ll bring up both bugs with the team to get them addressed.

You also mentioned that you don’t see VIVE Focus 3 Controller Interaction as an option in the PC tag, but I tried with release 2.4.1 and could see it there too, so you could try updating your VIVE OpenXR Plugin (com.htc.upm.vive.openxr) package version.

Good afternoon Chris,

Thank you for digging into this for me. I am relieved to know I wasn’t missing something silly - and thank you for explaining the bug error to me.

I installed the VIVE OpenXR plugin and I can now enable the controllers on PC platform too. I only had the VIVE OpenXR plugin for Android installed.

Thanks for your help!

Aimee