Input on Unity UI not working ONLY when ran with WMR
Describe the bug
While trying to build the same application for both HoloLens and WMR, I noticed that if I ran that App through the Mixed Reality Portal, UI input did not work. Everything worked in Editor and HoloLens. To be clear, the raycast did stop on the Canvas, but the button did not highlight on hovering and click did nothing. Also, simulating the controllers in the WMR Portal while running the Unity Editor worked.
To reproduce
Create a new Unity Project Add only the MRTK2 with Examples Build a project with the scene HandInteractionUnityUIExample.unity
Expected behavior
When hovering or clicking a Unity UI button, the button should react accordingly.
Video
Here's a video showing the button not reacting to the simulated controller (it takes a while for me to get on and off the button, sorry about that, simulated controls are terrible):
https://imgur.com/h5qLfv8
You can see the controller's ray does collide with the Canvas, but nothing happens with the buttons.
Setup
- Unity 2018.3.12f1
- MRTK v2.0.0-RC1
Target Platform
- WMR immersive
I would ask if this repros on the latest release (i.e. RC1 refresh) but I think our latest actually has an issue where it doesn't work when deployed for reals (like you have here).
I think that we can try to validate this after fixing that bug (https://github.com/microsoft/MixedRealityToolkit-Unity/issues/4287)
Updating to latest release seems to have fixed the issue.
Exactly the same bug is reproduced for me on the latest release on the HandInteractionUnityUIExample scene. Works ok in Unity Editor with WMR headset and HL1.
Unity: 2018.3.14f1, 2019.1.0f2 Mixed Reality Toolkit 2.0.0-RC1-Refresh OS version: 10.0.17763 Build 17763 Mixed Reality Portal Version: 2000.19011.1132.0 (I tried to re-install it too).
Reopening as the problem is not completely solved. This issue is still present though not all the time. Using the latest version of the MRTK2 (RC2.1) most of the time input does not work on UI elements. Restarting the computer multiple times solves the issue (restarting until it works) Tested on multiple computers.
Just gonna confirm, this looks like it's still happening.
Closing as dupe of #4821
Additional Information
-
I have had this issue intermittently for the past few months.
-
I have made a build on Computer A, tested the Unity UI.. It works. I performed a restart on the request of my manager and then the Unity UI stopped working. The same build was run on another machine, and the Unity UI worked.
Closing as dupe of #4821
This problem is still occurring. I have tested with MRTK 2.4. This is so random and hard to figure out the cause. The unity canvas based UI arbitrarily stops working. Did anyone figure out why it is happening?