Example #1
0
 public void LoadMapVersions()
 {
     using (Stream stream = File.Open(Application.persistentDataPath + "/MapVersionData.dat", FileMode.Open))
     {
         BinaryFormatter fm   = new BinaryFormatter();
         MapVersionData  temp = (MapVersionData)fm.Deserialize(stream);
         mapVersionListing = temp.mapDictionaryPairs;
     }
 }
Example #2
0
 public void SaveMapVersions()
 {
     using (Stream stream = File.Open(Application.persistentDataPath + "/MapVersionData.dat", FileMode.Create))
     {
         BinaryFormatter fm   = new BinaryFormatter();
         MapVersionData  temp = new MapVersionData(mapVersionListing);
         fm.Serialize(stream, temp);
         stream.Close();
     }
 }