- Home /
Application.LoadLevel (Roguelike 2D)
Hello,
So I completed the Roguelike project tutorial. I wanted to add a Menu screen. I created a Menu scene that would load the original game scene with Application.LoadLevel.
For some reason this loads the game in day 2 and having duplicate set of objects on the hierarchy, from then each transition is 2 day. I haven't altered the original game much. What am I missing?
Hi, had the same problem!
did you figured out how to fix it?
Answer by miccoa · Mar 23, 2016 at 11:01 AM
Hi,
I think you could comment out with "//" the OnLevelWasLoaded method (in GameManager.cs). Then you could set a "level = 1;" in GameOver method (in GameManager.cs). Finally, or any order you like, you could place "level++;" in Awake method (in GameManager.cs).
I think these hopefully helps some, at least me they did.
Reference material: http://answers.unity3d.com/questions/895771/trouble-with-loadlevel-and-onlevelwasloaded.html
Greetings, miccoa
Answer by Knuxguy01 · Mar 24, 2016 at 09:40 PM
This may not be the best answer to this problem, but I got it to work by getting rid of the InitGame() call within the Awake function of GameManager.cs and initializing the level variable to 0 instead of 1. hope that helps!