I’ve the following:
-
A plane as the ground
-
A cube on top of the plane
-
Attach RigidBody to the cube
-
Attach the code snippet below
void OnMouseDown()
{
Debug.Log("OnMouseDown");
}
I was expecting that I’ll see the log every time I click the cube.
But, it behaves randomly. I click on the cube. One of five or six clicks, I got one log message.
What did I do wrong?
Thanks in advance for your help.