NearInteraction not working with MRKeyboardInputField prefabs
Describe the bug
Entering the HandInteractionExamples Demo, there is a MRKeyboardInputField_UGUI which calls the Keyboard when entering into it with the index finger (near interaction). Using either the MRKeyboardInputField_TMP or MRKeyboardInputField_UGUI prefab from the MRTK it won't call the Keyboard when near interacting with it.
To reproduce
Steps to reproduce the behavior:
- Create a Scene
- Drag both MRKeyboardInputField_TMP and MRKeyboardInputField_UGUI prefabs into the scene
- Build scene onto Hololens
- using far interaction the keyboard will be called, using near interaction it won't.
Expected behavior
I would expect the Prefabs to behave the same as in the Demo Scene. (Or have I missed to add some scripts, did check though? :S)
Your setup (please complete the following information)
- Unity Version 2019.4.21f1
- MRTK Version 2.6.0
Target platform (please complete the following information)
- HoloLens 2
@MaxWang-MS Do these prefabs need NearInteractionTouchable or something added to them for near interaction?
@keveleigh I tried adding the NearInteractionTouchable (plane) and then in an other try adding a boxcollider, both didn't work.
Also I can't find a difference to the Demo scene in terms of components that might be different to the prefabs.
I do not think that is the expected behavior. Could you try the MixedRealityKeyboard Example scene and let us know whether that works for you?
@MaxWang-MS Hey Max, just tested the MixedRealityKeyboard Example scene. Sadly it didn't work either, using Far Interaction the Keyboard popped up, using Near Interaction for both InputFields the Keyboard didn't show.
@MaxWang-MS Hey Max, thanks for Triaging the bug. Can you already say by when it will be fixed or in which next MRTK release it will come?
We're going to need this feature for our clients. Thanks
After looking into the issue I realized that this is not a bug in code - it's just the MixedRealityKeyboardExample scene is not configured for near interaction. In that scene select the Canvas GameObject, then in the inspector click on the "Add NearInteractionTouchableUnityUI" button under the Canvas section, and then go to the newly added near interaction section select pointer in the events to receive dropdown. Please let me know if this works for you.
Fixed via #9816