- Home /
guiText.HitTest(Input.mousePosition) is not triggering
I have a GUIText object that I cam trying to do some hover and click states for, but the Hit Test is not triggering.
By printing the guiText.GetScreenRect() I was able to find out that it has a height of zero, which would mean that the hitbox could never be hit.
(left:363.50, top:38.00, width:77.00, height:0.00)
I have tried both with and without a collider attached with the same result.
Is this a bug in the hitbox calculation or am I just messing it up?
if(guiText.HitTest(Input.mousePosition)){
//do the things
}
Comment
Your answer
Follow this Question
Related Questions
GUI Text Area that Reads / Writes / Saves 2 Answers
GUI text Main Menu 1 Answer
How to get print to transfer to a GUI Text? 1 Answer
Text Prompt Problem 1 Answer