- Home /
Mouse moves over GUI
I want to know if there is a GUI.Box under the mousepointer. How to do that? I think I need input.mouseposition but don't know how to find the GUI.Box.
Answer by Statement · Dec 13, 2011 at 01:57 PM
You could either put some information in the tooltip for each Box, and read GUI.tooltip if it is set (see the link for tutorial on how), or you could keep a collection of rects for your boxes and check if any of them contain your cursor.
Btw: Use Event.current.mousePosition for GUI space coordinates.
Your answer
Follow this Question
Related Questions
GUI label dimensions bug 2 Answers
UI Box to appear on mouse position 2 Answers
Input.mousePosition incorrect on second monitor 0 Answers
Input.mousePosition only detects motion outside of window if I move really slow. 1 Answer
Trying to Highlight text in order to copy and paste, but do not want the text to be editable. 1 Answer