onMouseDown

Hi,
Has anyone else experienced OnMouseDown events being received on iOS?
I have an app testing on iPad2 that appears to be triggering OnMouseDown events via direct touches on a button object with a collider.
According to Unity - Scripting API: MonoBehaviour.OnMouseDown()IMPORTANT: This function has no effect on iPhone.” this is not possible.

I’ve triple checked, and going to do another, but afaik there is no code doing the touch phase detection and sending mouse emulation events., only the OnMouseDown.

ty!

Yes, it does work on iOS.

Thanks for the confirmation.

Does that make it a bug or a feature?

It doesn’t really mind if you write a controller for Desktop and one for iOS.
Both controller aren’t supposed to run at the same time…

I use to work with it on iOS + desktop and reduce a bunch of work as well since I can play directly the editor.

so anybody have an example of how to make an on screen button for iPad, that triggers an animation to play when touched.

I’d prefer to use onMouseDown, so that I can test on my Windows machine, before sending to a mac dev person to do the actual building for iPad.

Use GUI.Button() for it, not a onMouseDown =_=…

If you are on this step, you should first download one of the unity project to start working with Unity =_=…

Unity should fix their documentation then

Use something like Fingergestures to handle this http://fingergestures.fatalfrog.com/

the only problem with onmousedown is that if you have a finger on the screen it won’t work.