Hello everyone! I've made a script, witch checks if the touchpad is touched and stops time, setting the variable paused = true, hiding the HUD(including the touchpad) and displaying the GUI.Button. The problem is: after the touchpad(named lePauseButton) is touched IT DOESN'T DISPLAY THE BUTTON. Here's the script:
That's pretty much it, I've spent over 5 hours on studying the sctipt, raped the google for answer but i couldn't find a thing. Help will be much appreciated. Take Care!
The reasons for OnGUI not be called are : 1) the function's name is incorrect (not your case). 2) The gameObject is inactive. 3) The component is disabled. I doubt that your problems is in those three cases.
FIRST IDEA : A timeScale null won't stop the GUI call, that would be unfortunate for a pause menu. So the problem comes from the boolean "paused". I don't think you ever get the print "Paused", which means the input is incorrect. I don't code on mobiles so I can't help, but I'm sure there is a lot of informations about it.
SECOND IDEA : The pause works, the GUI button is drawn, however the texture is incorrect. Missing, too big, doesn't fit, you name it. Try with a string first. The button style should be visible however, so this seems unlikely.
answered Jun 12 '12 at 04:03 PM