Ejemplo n.º 1
0
    public static void Save() {
        Debug.Log("Saving");
        savedGame = playerSave.GetCurrent();

        XmlSerializer Serialisation = new XmlSerializer(savedGame.GetType());
        StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/Save.xml");

        Serialisation.Serialize(sw, savedGame);
        Debug.Log(savedGame.ToString());
        sw.Close();
    }
Ejemplo n.º 2
0
    public static void Save()
    {
        Debug.Log("Saving");
        savedGame = playerSave.GetCurrent();

        XmlSerializer Serialisation = new XmlSerializer(savedGame.GetType());
        StreamWriter  sw            = new StreamWriter(Application.persistentDataPath + "/Save.xml");

        Serialisation.Serialize(sw, savedGame);
        Debug.Log(savedGame.ToString());
        sw.Close();
    }