Exemplo n.º 1
0
    public static void SaveLevel(LevelInformation info)
    {
        BinaryFormatter formatter = new BinaryFormatter();

        string     path   = Application.persistentDataPath + "/" + SaveName + ".bin";
        FileStream stream = new FileStream(path, FileMode.Create);

        LevelData levelData = new LevelData(info);


        saveData.AddLevel(levelData);

        formatter.Serialize(stream, saveData);
        stream.Close();
    }