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

NearInteraction not working with MRKeyboardInputField prefabs

Open Spoon2311 opened this issue 5 years ago • 7 comments

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:

  1. Create a Scene
  2. Drag both MRKeyboardInputField_TMP and MRKeyboardInputField_UGUI prefabs into the scene
  3. Build scene onto Hololens
  4. 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

Spoon2311 avatar Mar 30 '21 14:03 Spoon2311

@MaxWang-MS Do these prefabs need NearInteractionTouchable or something added to them for near interaction?

keveleigh avatar Mar 30 '21 16:03 keveleigh

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

Spoon2311 avatar Mar 30 '21 16:03 Spoon2311

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 avatar Mar 30 '21 20:03 MaxWang-MS

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

Spoon2311 avatar Mar 31 '21 12:03 Spoon2311

@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

Spoon2311 avatar Apr 12 '21 09:04 Spoon2311

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.

MaxWang-MS avatar Apr 13 '21 04:04 MaxWang-MS

Fixed via #9816

MaxWang-MS avatar May 19 '21 18:05 MaxWang-MS