I am preparing a WebGL demo and am aiming to also make it work on mobile browsers. I know at the moment it is not officially supported, but the demo works just fine if I dismiss the warning about Unity being unsupported.
I only have one issue, which is I cannot read any input from the user. I simply want to detect if he selects something by touching the screen.
In a desktop based browser, I can read
Input.GetMouseButtonDown(0)
And it works fine. But on mobile, with the exact same code, this does not register the users action.
I also monitored
Input.GetTouch(0).tapCount
And it is always zero no matter how much I tap.
I tried in many browsers, alsways the same issue. Quite frustrating as everything else works perfectly fine in a mobile browser.
How can I read user input in WebGL on a mobile device?