Does onMouseDown convert to a Touch command in iOS or not?

The Unity documentation says that onMouseDown does NOT convert, but [this thread][1] says otherwise.

According to [this other thread ][2], this might not work due to the image not being a power of 2. I converted and re-imported the image. All without success.

Also, I have tested this, and it doesn’t work, but maybe there’s a checkbox somewhere I’m not ticking?

Anyone know for sure?

If not, help with using touch with a GUItexture would be much obliged.


I can’t see any post in the thread that states it would work on mobile. Do you refer to nicholas post? He said that they emulated mouse input and generated the function calls manually.

Usually Unity automatically casts a ray each frame to check which object is below the mouse position. On a mobile build this has been disabled for performance reasons. You can still do it manually.

Also note that GetMouseButtonDown is a function, not a callback like OnMouseDown.

Btw your question seems to be flipped :wink: I guess you mean if a touch translates to OnMouseDown and the answer is: no.