Saving and loading help, please!

my game has a level map, so whenever i collide with the end of level object in a level i return to the level map and the next level becomes unlocked. how would i get my game to save the unlocked levels or save that i collided with the end of level objects? Please help! All help is greatly appreciated! Thanks!

You can save the level number to playerPrefs.SetInt()like this:

PlayerPrefs.SetInt("Last Level", 5);

and next time, load it like this:

Application.LoadLevel(PlayerPrefs.GetInt("Last Level"));