Hi there,
I have some problems with Unity loading levels. My game is basically a scenario divided in two scenes. When you begin to play, the first one is present, and is not since you arrive to a trigger that the second is loaded (with LoadAdditiveAsync)
My problem comes with a “pause menu” that has a button to go back to the “main menu”. The initial code that I made to achieve this was simple. When the button is pressed:
Application.LoadLevel("MainMenu");
And all went ok with both scenes loaded (in the editor). The problem comes when I build the standalone exe and I try to select the same option (go back to the main menu), being in the second scene, so the program crashes. The app just freezes with no reason, and no info is written in the output log.
I´ve been reading the forums, and I guess that it could be a memory issue. I tested some solutions, but even with the simplest of them, which is load an empty scene just before load the scene you want to load, I´m having the crash. The last thing I did was just load the empty scene, with nothing after, and even this make the app to crash.
The only logical reason that I think could cause this, is the scene having too many GameObjects. Could this possibly lead to some critical hiccup during the unload process (made internally by the LoadLevel)?
Can anyone give me any advice?
I don´t know what could be causing this, and trying to find the solution without any debug info is pretty hard…
Thank you so much!