- Home /
GUI elements vanish when publishing
I have a simple timer that's connected to a GUI Text in an empty game object. At the start of the game, the timer begins, and restarts the level if an objective isn't met by the end of 5 minutes. In the editor, the script works flawlessly with the exception of this error:
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced (type:Layout)
When I publish the game, the GUI text appears, but fails to update as the time progresses. I know it's not the script itself causing problems, as when I make a completely new project, the timer publishes fine and runs accordingly without error.
I also have a simple GUI at the start of the game with buttons to "start game" or "exit" which appears in the editor, but vanishes upon publishing. Like the timer, it works flawlessly when publishing in a new project and gives no errors.
Anybody have some insight into what the problem could be? It would be very appreciated
Answer by Steph 1 · Jan 18, 2011 at 11:46 PM
I've discovered that this occurs when the metadata files in the library become altered. This can occur by accident if you are often merging changes between various build versions. You may have to copy all assets to a new project folder to get them to build correctly. You can try to reimport all in your current project, however this can also corrupt your current project. So if you do choose to try this route, I'd advise you to first make a backup of your current project.
Your answer
Follow this Question
Related Questions
Disable the function timer? 1 Answer
GUI & GUI Text Disappear When Publishing 6 Answers
GUIText not working properly with a timer. 1 Answer
Start a timer after instantiating a game object 1 Answer
Unity UI never stays in place 1 Answer