I bought 1 physical device with pen (Samsung Note 4) to try to debug, and the input with pen works fine on the UI (EventSystem/Input System UI Input module), but when I try to access it via code it’s not working: Pen.current is always null (I’m checking it on every Update, and it’s never non-null)
I tried docking/undocking the pen several times, nothing changes. On Logcat I can clearly see the pen is working, there are several log messages when I dock/undock it, for example:
D/PenGestureReceiver: onReceive() Pen Insert Action : true. mPenDetachOption : 0
D/PenGestureReceiver: onReceive() Pen Insert Action : false. mPenDetachOption : 0
And also as I said on the UI the pen works fine.
As a fallback I try to read the pen as mouse using the old input (which always worked) and it also doesnt work, but I guess this would be a new bug of the old input (stopped working in 2019.2).
Any ideas? Any workaround/idea is welcome, Im kinda stuck here and getting lots of bad reviews since old input isnt working for pen on Android and it seems the new input system also isnt.
The only workaround I can think of is adding an invisible layer on UI, getting the touches/clicks there, then converting to world coords. But this would be a major rework on my input module.
@gilbertoPlayX I’m getting several bad reviews and bug reports from players regarding the input after I migrated to the NIS, but the pen was the only one I could consistently reproduce. The others I dont even bother reporting because for Unity team if you cant consistently reproduce it then the bug doesnt exist, they dont even care
also, i notice when i send apk to my team test if they didn’t clean their cache before start playing new apk version the game has a different behavior like its a combine version between the older and new builds.
Scrollrects were working fine for me on the new input if I recall correctly.
Last week I ended up rolling back to the old input and back to Unity 2019.1 due to several small touch-related problems (not only Pen) on random Android devices… got several complains from random players all touch-related and rolled back
I have similar issues with touch as the Delta is incorrect on android devices ( Issues reading delta/x [Touchscreen] on device ). On my touch-enabled PC the Delta is properly captured by android is giving issues.