- Home /
Android input only works with remote
I am using Unity 5 and I'm trying to port a game for mobile. I'm using an android 6 device and with remote 5 the game input handles as expected. However, when I try it on a real android device, it does not work. I have tried:
Using different android SDKs Checked
the logger for errors Copied the .apk
to the device and installed manually
Checked and removed ALL code related to desktop input
There is simply no reaction whatsoever. I log the number of updates I do and that prints just fine. But in the same update function I try this:
foreach (var t in Input.touches)
{
Debug.Log("TOUCH");
}
And it does not print the TOUCH string. What could be the problem?
Answer by Vollmondum · Jul 10, 2017 at 07:12 AM
It's doesn't print because there's no condition to detect a touch, you just ran a loop. You could at least add if touches > 0
Your answer
Follow this Question
Related Questions
How to differentiate touches on mobile devices 1 Answer
Touch Input positions are different on iOS and Android? 2 Answers
EventSystem.current.IsPointerOverGameObject(t.fingerId) - Not working on Android builds - Unity 2 Answers
Detect if finger lifted off screen 1 Answer
Android touches wrong after using the application at least once 0 Answers