Ive added the script to my object and tried adding OnMouseDown so that something happens when the user presses the object but it doesnt appear to work, how can I implement this on the iphone?
function OnMouseDown()
{
//do something to this object
}
Once I did it right but no more. One thing I made sure then was adding a collider, but now even adding the collider doesn’t seem to work.
http://forum.unity3d.com/viewtopic.php?t=18736&highlight=
Don’t know the reason, why it is not working any more. Any one know the reason :?:
mookler, you better use RaycastHit for the scenerio.
I created a cube and attached the following script
function OnMouseDown()
{
print("clicked");
}
using ‘Unity iPhone’. Nothing happened.
Then I did the same using ‘Unity’, it worked fine :!: