Closed markgrossnickle closed 6 years ago
Is this an issue with Unity?
I'm not entirely sure how we can compensate for this. The uGUI elements are raycasted from an Orthogonal Camera.
Yeah, it does seem like it may be more of a Unity issue.
Currently the keyboard.prefab is the only object we use that involves uGUI so I am just setting the eyeTextureResolution to 1 before we show the keyboard and then back to 2 when we close it.
Overview
When running on Mixed Reality headsets the motion controllers will not trigger uGUI elements if you change the XRSettings.eyeTextureResolutionScale to 2.0f. (Most likely, anything other than 1.0 will fail).
The initial reason I did this was to fix some poor quality images as noted here: https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/1327
The image quality does improve for textures and 2D sprites but there is this nasty side effect.
Expected Behavior
uGUI should continue to trigger events when you point the motion controller at them even if the eyeTextureResolutionScale changes.
Actual Behavior
The uGUI elements will work in the editor even when attached to the device. They will not trigger events when running from Visual Studio or a deployed app.
Steps to reproduce
Set XRSettings.eyeTextureResolutionScale = 2.0f. Build the app and run it from visual studio. Open the Keyboard.prefab and try to point a motion controller at it to trigger the roll over or press events. None will occur.
Unity Editor Version
2017.2.1p1
Mixed Reality Toolkit Release Version
2017.2.1