Anyway to save which seen the player was on, then load that scene back from another one at a different time?

I need unity to remember which scene i was playing before i quit, and then load it back hen i run the game again from a different scene- how do I do this?

Have a look at the PlayerPrefs class - http://unity3d.com/support/documentation/ScriptReference/PlayerPrefs.SetInt.html

something like this should do the trick:

Set the player level when a new scene is loaded to save the number of the last level to be loaded on the player's machine:

PlayerPrefs.SetInt("SaveLevel", Application.loadedLevel);

And call this when the game is first started to get that same value:

savedLevel = PlayerPrefs.GetInt("SaveLevel"));

hi, may i aske? how do i declare savedLevel?