MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Input on Unity UI not working ONLY when ran with WMR

Open WolfoDev opened this issue 7 years ago • 9 comments

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

WolfoDev avatar May 13 '19 10:05 WolfoDev

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)

wiwei avatar May 14 '19 23:05 wiwei

Updating to latest release seems to have fixed the issue.

WolfoDev avatar May 24 '19 13:05 WolfoDev

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).

slavabielkin avatar May 31 '19 21:05 slavabielkin

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.

WolfoDev avatar Jul 30 '19 16:07 WolfoDev

Just gonna confirm, this looks like it's still happening.

maluoi avatar Feb 18 '20 23:02 maluoi

Closing as dupe of #4821

Troy-Ferrell avatar Mar 02 '20 18:03 Troy-Ferrell

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.

DanCRichards avatar Mar 05 '20 22:03 DanCRichards

Closing as dupe of #4821

keveleigh avatar Apr 21 '20 17:04 keveleigh

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?

albinhw avatar Jul 12 '20 21:07 albinhw