//Highscore SaveStates public static void SaveHighscore(scr_Highscore Highscore) { BinaryFormatter formatter = new BinaryFormatter(); string path = Application.persistentDataPath + "/Highscore.dab"; FileStream stream = new FileStream(path, FileMode.Create); PlayerData data = new PlayerData(Highscore); formatter.Serialize(stream, data); stream.Close(); }
public PlayerData(scr_Highscore Highscore) { highscore = Highscore.highscore; }