How to use PlayerPrefs? (439730)

Hi guys.

How can i use PlayerPrefs to save my game? Is there any tutorial available out there (JavaScript) ? If not, can someone give me an example on how to use it?

Here is a piece of my code:

Unlocking level code:

static var level2unlock : boolean;
var level2 : UIButton;
function Update () {
if(!level2unlock)
{
level2.controlIsEnabled = false;
}
else
{
level2.controlIsEnabled = true;
}
}

Code used in level 1. If a condition is met, unlock level 2.

if (transform.position.y > 47)
{
levelunlock.level2unlock = true;
}

I know that i must use PlayerPrefsX to save this kind of information, but i haven’t used PlayerPrefs before so i still have no idea. Anyone can help me?

Thanks

Anyone?

Im sure there is tutorials on the web somewhere just keep looking

To save:
PlayerPrefs.SetInt(“Level2Unlocked”,1);

To load:
Level2Unlocked=PlayerPrefs.GetInt(“Level2Unlocked”,0); //0 is default if there is no info.