Пример #1
0
        public static void Load()
        {
            // Load the graph object from a file
            BinaryFormatter formatter = new BinaryFormatter();
            FileStream      fs        = File.OpenRead(Application.persistentDataPath + "/testsavedata.sb");
            object          graph     = formatter.Deserialize(fs);

            fs.Close();

            //Debug.Log(graph.ToString());

            // Retrieve the data we saved
            TestSaveData sd = (TestSaveData)graph;

            Debug.Log(sd.ToString());
        }