I was wondering how I could detect weather a Player was using mobile or computer/desktop on my 2d platformer. If so, I want to add mobile controls. Thanks!
You can check for the first user input whether its a keyboard/mouse or a touch. This will let you know what they are playing with.
Here is a quick video that will take you through the steps:
youtu.be/WQPUCo95D-s
My bad, I wrote an example that retrives the Connection Type not the Hardware Type. Sorry
Develop games in your browser. Powerful, performant & highly capable.
See the built-in Detecting input method example.
What would be detected if you were using a smartphone with a pad?