- Home /
Loading last scene
So I'm working on a Game Over screen for a game. Right now I got all the buttons set up nice and pretty how I want them. Right now though, I'm trying to figure out how to load a scene. Right now, I know that Application.LoadLevel will load a scene, but our game has several scenes, so I can't really tell it to just load the first level. So here's my question:
How would I load the most recently used scene?
Answer by Jesse Anders · Apr 12, 2011 at 09:10 PM
Although I don't fully understand the question, it sounds like you need to save the index or name of the scene in question somewhere so that you can reference it when needed.
Common ways of storing such data are static member variables, objects marked as 'don't destroy on load', and PlayerPrefs.
Your answer
Follow this Question
Related Questions
How to transition from Load to scene ? 1 Answer
Current Level Load Again After Level Completion 2 Answers
Time.deltaTime is 0 after LoadLevel 1 Answer
Preloading scene issue 0 Answers