Mouse functions on mobile ?

Hello.

Are mouse functions working on mobile ?

Like OnMouseUp, Input.GetMouseButtonDown, Input.GetMouseButton,Input.GetMouseButtonUp,…

or i need to change them all for mobile ? Because they work on my phone, but idk if it will work on all other phones. On build i get warning about this:

Game scripts or other custom code contains OnMouse_ event handlers. Presence of such handlers might impact performance on handheld devices.

I’m using latest Unity 2020.

Regards

Generally on multitouch mobile, the mouse will function as an average of ALL TOUCHES.

This might be fine, and a lot of applications don’t care and just let this happen.

Keep in mind if you have a button and touch 2 fingers on either side (outside) the button, then release it, the button will think it has been touched by the mouse. You might not want this.

3 Likes