- Home /
Reloading level seems to stop movement
I am trying to re-start the game with a keypress by using Application.LoadLevel(0) but, after the game re-starts, the object I usually move forward with the "w" key no long responds to the "w" key to move forward. So my question is: are there any differences between the actual first time loading the level and loading level 0 in the middle of a game? Put another way, is there a way to make it so that re-starting by loading level 0 will be different from the original start or is that impossible?
Thanks!
There have to be some other problem with your game. A scene (Level) shoud be working the same way, doesn't matter if you load it once or 100 times.
Correct :). But if you plan to use it in that scene only, then you'll be setting it's initial value in the awake or start functions, which will reset them. :)
@instruct9r: If there is another problem, I'm interested in what it could possibly be because I would've thought a LoadLevel would reset everything so as to be exactly the same as if the game were initialized for the first time.
@whydoidoit: That's a good reason - the static variables could make a difference!
@instruct9r: I only have the one scene which I'm reloading and it does not seem that the static variable is reset when I do a LoadLevel("TheScene")
They aren't reset unless you explicitly reset them in Awake or Start.
Answer by haim96 · Feb 19, 2014 at 02:03 PM
did you pause the game with time.timescale=0 somewhere? if yes, you should set it back to 1
7 years later, thank you. I had a hitPause that set timeScale to 0f then if player died... it never set it back to 1. So reloading the level never had it set back to 1.
Thank you!
Your answer
Follow this Question
Related Questions
Restart Current Level 2 Answers
Current Level Load Again After Level Completion 2 Answers
How can I restart a single-scene game? 1 Answer
Reset The Scene ? 2 Answers
Can't go back to the game scene from main menu for the second time 2 Answers