public void ImportFromStream(Stream inputStream)
        {
            BinaryFormatter bf         = SerializationSurrogateUtil.GetBinaryFormatter();
            var             exportData = (ExportData)bf.Deserialize(inputStream);

            PersistentVegetationCellList           = exportData.PersistentVegetationCellList;
            PersistentVegetationInstanceInfoList   = exportData.PersistentVegetationInstanceInfoList;
            PersistentVegetationInstanceSourceList = exportData.PersistentVegetationInstanceSourceList;
            inputStream.Position = 0;
#if UNITY_EDITOR
            EditorUtility.SetDirty(this);
#endif
        }
        public void ExportToStream(Stream outputStream)
        {
            var exportData = new ExportData
            {
                PersistentVegetationCellList           = PersistentVegetationCellList,
                PersistentVegetationInstanceInfoList   = PersistentVegetationInstanceInfoList,
                PersistentVegetationInstanceSourceList = PersistentVegetationInstanceSourceList
            };

            BinaryFormatter bf = SerializationSurrogateUtil.GetBinaryFormatter();

            bf.Serialize(outputStream, exportData);
            outputStream.Position = 0;
        }
        public void ExportToFile(string filename)
        {
            var exportData = new ExportData
            {
                PersistentVegetationCellList           = PersistentVegetationCellList,
                PersistentVegetationInstanceInfoList   = PersistentVegetationInstanceInfoList,
                PersistentVegetationInstanceSourceList = PersistentVegetationInstanceSourceList
            };

            BinaryFormatter bf   = SerializationSurrogateUtil.GetBinaryFormatter();
            FileStream      file = File.Create(filename);

            bf.Serialize(file, exportData);
            file.Close();
        }
        public void ImportFromFile(string filename)
        {
            BinaryFormatter bf         = SerializationSurrogateUtil.GetBinaryFormatter();
            FileStream      file       = File.Open(filename, FileMode.Open);
            var             exportData = (ExportData)bf.Deserialize(file);

            PersistentVegetationCellList           = exportData.PersistentVegetationCellList;
            PersistentVegetationInstanceInfoList   = exportData.PersistentVegetationInstanceInfoList;
            PersistentVegetationInstanceSourceList = exportData.PersistentVegetationInstanceSourceList;

            file.Close();

#if UNITY_EDITOR
            EditorUtility.SetDirty(this);
#endif
        }