- Home /
Reset The Scene ?
Hello, I've been using Application.LoadLevel(0) for resetting to my scene but all stuffs that I've done is still there :S So how can i Completely Reset my Scene ? Is there a code piece for it :D ?
Answer by DeveshPandey · Sep 10, 2013 at 07:50 AM
You should check you build settings- Press CMD+SHIFT+B FOR MAC or CTRL+SHIFT+B for window, and see there is any scens added or not in Scenes in build, if not then drag and drop your scene there.
then use Application.LoadLevel(0); // 0 is the index in build setting
it will work.
so exactly what I said: "If you have your Scene in the build settings as Scene 0, then it will work."
Answer by Benproductions1 · Sep 09, 2013 at 12:06 AM
Loading a new level removes all objects from the current scene. If you have your Scene in the build settings as Scene 0, then it will work.
I assume you have either not assigned the scene to the build settings and are getting an error message, OR you have ridiculously marked everything with DontDestroyOnLoad.
Hope this helps,
Benproductions1
No it didn't worked :( I don't know what to do. When i try to reset timer, Timer stucks on 0:00 and level cannot be reloaded :S What can i do !
Are you possibly storing things in static variables. Those won't get reset ever (until restart). It's hard to give any more detailed answers without seeing some code
http://answers.unity3d.com/questions/533478/static-variable-doesnt-change-.html Here is my all codes. please help :(
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Can't get simple script to work? 4 Answers
How can I restart a single-scene game? 1 Answer
restart when dead 2 Answers
Resetting a Scene 2 Answers