Sunday, March 18, 2018

Testing Touch Input with Mouse

When developing a game for mobile, it is beneficial to be able to test input on the computer before deploying to the mobile device.  In the case of testing a single tap on the screen, the OnMouseDown function will work as a single tap on the mobile device.

In this way, you can test single taps on the computer through mouse clicks, and it will still work once it's deployed.  For more complex touch inputs such as multi-finger and dragging, you'll want to use the Input.GetTouch functions.