Hello all,
I am having a problem with Application.LoadLevel. I have a main menu scene and a game level scene in my current game. The game first loads the main menu scene, and when the player starts a game it loads up the game level scene. This much seems to work fine.
The problem seems to come in when I’m trying to use Application.LoadLevel from the game level scene. I’m trying to use it in two different places… one for reloading the game level scene in order to reset it, and one for returning to the main menu. Neither one seems to be working correctly. The scene will load, I’ll see the hierarchy for the scene loaded in the editor, but it seems like it gets stuck at that point. There’s a fade in script attached to the main menu that fades up from black that never finishes running, so there’s a black box covering the menu and you don’t actually see it. For the game level, the animation that moves the player through the level never starts playing.
I’ve pared down both functions (reset level and back to main menu) to a single Application.LoadLevel statement to load the appropriate scene, and it still doesn’t seem to be working. If I load each scene individually they work fine, and if I start the game from the main menu it loads the game level fine.
Has anyone else experienced a problem like this?