- Home /
Question by
$$anonymous$$ · Sep 14, 2014 at 06:35 AM ·
guicolliderthrough
OnMouseExit doesn't work through gui
Hello! I have an issue with GUI, so OnMouseExit doesnt works through GUI, when the mouse is not any longer over the object. It works perfectly without GUI. Im using GUI.Buttons and GUI.Box.
void OnMouseOver()
{
renderer.material.color = Color.green;
}
void OnMouseExit()
{
Debug.Log("Exit");
renderer.material.color = Color.white;
}
Comment
Best Answer
Answer by $$anonymous$$ · Sep 22, 2014 at 12:43 PM
Fixed by checking
rect.contains(Input.mousePosition);
Your answer
Follow this Question
Related Questions
iTween colliders 1 Answer
Counter with a Rounded GUI bar 1 Answer
sphere gets into cube 1 Answer
ball sometimes goes through the bat when hit... collider problem... How to do a Raycast? 0 Answers
Mesh Collider falling through? 1 Answer