Hello all,
Can anyone provide some insight as to how the HitTest(vector) function works internally?
Hello all,
Can anyone provide some insight as to how the HitTest(vector) function works internally?
It checks if the pixel position is inside of bounds of the gui element.
http://unity3d.com/Documentation/ScriptReference/GUIElement.HitTest.html
I understand the doc, as far as what it does, but I’m looking for more of the internals of how it checks the inside bounds of a gui element. What exactly of the gui element is it checking against? The bounding “box” so to speak?
It checks the bounding rect of the gui element. For a gui texture this is the actual size of the gui texture on screen, for a gui text it is the rectangle surrounding the text.
Excellent. Thanks!