public static void SaveFile3(levelcount player) { BinaryFormatter formatter = new BinaryFormatter(); string path = Application.persistentDataPath + "/player3.oof"; FileStream stream = new FileStream(path, FileMode.Create); Saving data = new Saving(player); formatter.Serialize(stream, data); stream.Close(); }
public Saving(levelcount player) { scorevalue = levelcount.scorevalue; }