I am trying to make highscore and I am using player prefs. If the score is greater than the high_score than override score to new highscore and display it. But it doesn’t work.
function Update()
{
highscoretext.text = (PlayerPrefs.GetInt("Highscore")).ToString ();
if (score > high_score) {
score = high_score;
PlayerPrefs.SetInt("Highscore", high_score);
}