- Home /
Scene won't load more than once in a session
I am using unity 5 personal. I have a menu scene with a simple "click-to-load" button that loads my level 1. Within this level, I have pause menu that allows the user to quit, loading the menu scene. Now, the problem rises when I try to load my level 1 a second time. When the scene successfully loads, at first it all seems fine. It is visible and I can see everything. It's just that nothing happens. For instance, I have a delay on a door that opens and shuts. This normally works, but when I load the level from the menu a second time, it suddenly doesn't. Everything is in its right place, they just don't move.
I have put objects with rigidbodies to test that nothing happens. When the level first loads, the fall like they should. The second time, they float in the air. I have put debug.logs in the Start() and Update() functions and they are called as normal, printing out their text. I even put these logs in the delay function, and these are called as normal.
I have no idea what is going on here, as the Application.LoadLevel(Application.LoadedLevel) works fine for resetting when the player dies. I have tried both LoadLevel and Async. Both work in the menu as they should, loadlevel loading the scene, and async progressively loading the scene. It's just when the scene is actually loaded, nothing happens.
If you need to see any of my loading code, let me know (or anything else for that matter)
It would be great if someone could figure out how to look at my entire project
Thanks in advance
Answer by DiegoSLTS · Jun 11, 2015 at 01:06 AM
I'm guessing that when you display your "pause" menu you set the timeScale to 0 (to pause everything) and you forgot to set it back to 1 or whatever you where using. Note that UI can be setup to ignore (or not) the timeScale, so the UI might work as usual but the rest of the game might be stopped.
Your answer
Follow this Question
Related Questions
C# - Auto increment of Scenes through Collision 0 Answers
How to Save a UI Image Rotation and Load it When Coming Back from a Different Scene? 1 Answer
Open scene by typing a word 1 Answer
Worldspace UI in wrong position/scale after scene change 0 Answers
Canvas will only appear on the game screen when its child of a new loaded scene canvas 1 Answer