Touch does not work with the new Input System
Hello, I'm using Unity 2019.3.1f1 with the new Input System and I'm having some problems.
So, I have my input actions defined as such:
These actions are mapped to events like this:
The problem is, it doesn't work with any touch screen. The Input System's documentation mentions that touch screens should work with actions as if they were any usual pointer, but I cannot get mine to work at all, even though I can use my mouse just fine.
I've also tried to change the actions' Paths to touchscreen only, with no success.
I should also mention that I can read the touch screen's values just fine (for example, reading the position from Touchscreen.current), but I cannot make interacting with the screen trigger my defined Actions. Am I doing something wrong?
@lucascmgs Did you happen to make it working? There's so few mentions of this on internet that I thought I must be doing something wrong... I'm constantly updating to latest version, tried 2 different androind phones to exclude issue with the phone, tried to build the app to exclude issue with anything on PC, but just nothing... I've noticed that I can't even see my phone input debugger (not sure I suppose to see it there, but during Unity presentation that iPhone/iPad system was there). Tried to use touch as input as well as pointer, no difference. Tried also the sample scene for input system, it's not working there as well. I spent like hours trying to figure this out, but in the end fell back to old input manager for touch control, which works just fine. But I still want to make this working
Answer by fuczak3 · Jun 10, 2020 at 01:39 PM
Same issue here. I ran the Touch Samples, but touchscreen doesn't work. Please also see StackOverflow question: https://stackoverflow.com/questions/62304100/unity-2019-3-11-f1-unity-input-system-1-0-0-unity-remote-5-iphone-8-touch.
Update: unity remote 5 is not synced with new input system. It will be fixed in future.
I thought I was doing something wrong... turns out it just doesn't work with the remote app as you said. Thanks, I wouldn't figure this out without you. This should be a more upvoted issue.
Answer by quickytools · Jun 08, 2020 at 04:18 PM
I came across this sample today ... It can be imported and downloaded with the package manager under the Input System 1.0.0 asset Touch Samples. According to the Github this sample has existed prior to Oct 10 2019. I can't believe no one has posted about this as I've been searching the internet for anything like this for a month now.
wow thinks dude, exactly what i was looking for. and i see there is also a sample for gamepad mouse cursor, something else i need too.
Answer by Krnitheesh16 · Apr 14 at 01:25 PM
Yeah Unity Remote doesn't work with Unity's New Input System, but you can use Legacy Input System by enabling both in Edit -> Project Settings -> Player -> Active Input Handling to "Both".
For development, you can use "both" input systems, for production you can switch to "New Input System" because Unity's Remote only doesn't support New Input System, but Your Mobile Build will work with New Input System
In Simple words:
Use "Both" Input for Remote Play (For Development)
Use "New Input System" for Mobile Build App (For Production)
I'm just using this technique. It just works fine!
Answer by jhouser80 · Mar 02, 2020 at 12:59 PM
Same issue
Input.touch has the data and if I use the old eventsystem ui input module at least hi elements work but the touch position, Delta etc do not. Pointer on mouse works.
Answer by fgbg · Jun 13, 2020 at 09:44 AM
Oh ok. I just made a post about how my touch controls using the new input system work in the actual build on my android device, but not through remote 5.
Is this possibly why?