Input Fields are dead in built version

Dear all

I’ve been creating a cross platform app for many years now and I wanted to do a minor update this weekend. Everything is building fine, but I discovered that the text input is not receiving text input from keyboard presses in the build version. Everything else regarding the keyboard is working WASD, jump etc.
I can select with the mouse and move the caret by clicking the mouse, but I cannot enter text. There is no response from onChange events.

I’m on 2020.3.30f1 building for D3D - Unity UI

I’ve never experienced this before. It’s working on all other platforms Android, iOS, macOS as well as in the editor, but when I build and test in Visual Studio it stops working. No errors thrown just dead.
I tried entering something with the onscreen keyboard too, but with no luck.
I recently changed to the new input system, but it should not be that.

Can anybody direct me towards what this could be?

Regards Thomas

EDIT: Ok, I tested by enabling both input systems (old and new) and now I get input in the text fields. Is this really necessary? Can UWP not handle the new input system? Or am I completely missing something?
For testing reasons I made an empty scene with a text field only. Built it in VS for x64 Master and it works with old input and with the new input system it throws all sorts of errors. Is this a bug?

Hey,

Unfortunately you’re correct: UI InputFields (uGUI and TextMeshPro) won’t work on UWP in 2020 and earlier releases when using new Input System by itself. You must select “Both” input backends for InputFields to work on UWP. This is fixed with 2021+ releases.

The reason is: text input is handled separately from basic “key input” and requires additional platform code to pass text input up to UI and InputFields. For UWP this implementation was tightly integrated with the “old input” code paths, and so when the old input backend was disabled, text input was broken.

The fix required a refactor of input handling to (literally) factor out the text input handling from the regular key processing allowing UI to work regardless of which input backend was being used. Due to the size of the task it wasn’t completed in time for 2020.2 release and wasn’t backported due to the size and complexity of the change. Sadly, this means you’ll have to enable both backends for UI to work on 2020 LTS.

You’re certainly welcome to file a bug requesting this functionality be fixed for 2020, but I think it’s unlikely it’ll be fixed.

Thank you timke for your thorough reply! I’ll wait for the LTS of 2021 and stick with both input systems for now :slight_smile: