- Home /
Does Hit Test work with GUITexts and mouse?
I have this working fine for the touch versions of my game and also when I use similar code with GUITextures and mouse it works fine, this just isn't:
if (ContinueButton.HitTest(Input.mousePosition) && Input.GetMouseButtonDown(0) && bGameIsPaused)
{
Pause();
}
ContinueButton is a GUIText. Is there any reason this wouldn't work?
Comment
Answer by POLYGAMe · Dec 30, 2012 at 02:34 AM
BAH HA HA HA HA! Never mind... it was just a bracket placement issue. I'd put the code inside the for loop for the touch controls.... EPIC FAIL.
Your answer
Follow this Question
Related Questions
GuiText Score On Mouse Click 1 Answer
Offseting position of guiText in relation to mouse 0 Answers
How to stop mouse getting out of the game, my game is in webplayer? 2 Answers
Click Button 1 Answer