Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void SaveGame()
- {
- GameInfo GI = new GameInfo();
- BinaryFormatter bf = new BinaryFormatter();
- FileStream file = File.Create(Application.persistentDataPath + "/gamesave.save");
- bf.Serialize(file, GI);
- file.Close();
- }
- public void LoadGame()
- {
- BinaryFormatter bf = new BinaryFormatter();
- FileStream file = File.Open(Application.persistentDataPath + "/gamesave.save", FileMode.Open);
- GameInfo GI = (GameInfo)bf.Deserialize(file);
- file.Close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement