For example, I have put Sphere B on Cube A.
Then I add a script to Cube A, where the script is used for detecting onMouseOver and onMouseExit.
bool isMouseEntered = false;
void OnMouseOver ()
{
Debug.Log ("Enter");
isMouseEntered = true;
}
void OnMouseExit ()
{
Debug.Log ("Exit");
isMouseEntered = false;
}
However, when I play the scene and move mouse around, I cannot get an OnMouseOver event but an OnMouseExit event when mouse is pointing over Sphere B.
What can I do so that I can receive OnMouseOver event even if there were many game objects covered my Cube A?