Saving an int via PlayerPrefs...

I have a value of gold that the player collected stored in an integer. However, how would I save this using PlayerPrefs(in C#)?

Thanks in advance!

PlayerPrefs.SetInt(“Gold”, goldAmount);

Check out the DOCS.

And to retrieve it again do something like:

private int goldAmount = 0;

void Start()
{
   goldAmount = PlayerPrefs.GetInt("Gold");
}