hello everyone, i’m testing the new unity 4.6 but seems that a rect transform dosen’t react to OnMouseDown. Any ideas of how to make a rect transform clicable?
Add a button component.
If I understand your question correctly, you cant to be able to click on a cube, right?
Basically to click on gameObjects at run time you will need to use Physics.Raycast. You can learn about it here on the Unity Scripting Reference: Unity - Scripting API: Physics.Raycast
or if you want to make a cube move on mouse down you can use Input.GetKey(KeyCode.Mouse0) and transform.Translate(Vector3.DIRECTION * objSpeed * Time.deltaTime).