public static void AddHighscore(Highscore highscore) { HighscoreWrapper highscores = ReadHighScores(); highscores.Highscores.Add(highscore); SetHighScores(highscores); }
public static void SetHighScores(HighscoreWrapper highscores) { string json = JsonUtility.ToJson(highscores, true); File.WriteAllText(HighscoreFile, json, Encoding.UTF8); }