I’m trying to get things to display when you hover over a button or gui.
The script I have at the moment is what I mean, but I need the flexibilty of say an ‘if’ statement, so I could say, else hoverBox = false; so it would toggle off and on.
I like the idea of seeing if the mouse is in a box, maybe like a 2d box collider on the gui image? Although I’m struggling at where to start.
Thanks for any help!
bool hoverBox = false;
void OnMouseOver() {
hoverBox = true;
}
void OnGUI(){
if(hoverBox == true){
GUI.Label (new Rect (20, 200, 70, 30), "Slash");
}
}