You can do the following as soon as your game/level/round is finished. It'll save the highscore to the PlayerPrefs:
// loads the value for "highscore", returns the default 0 if it doesn't exist
int highscore = PlayerPrefs.GetInt("highscore", 0);
if(highscore < score)
{
// saves the value of "score" into the highscore field
PlayerPrefs.SetInt("highscore", score);
}
↧