Exemplo n.º 1
0
        public static void RewriteFileContent(string fileName, object data, FolderPaths path)
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = System.IO.File.Open(UnityFile.GetFolderPath(path) + "/" + fileName, FileMode.OpenOrCreate);

            bf.Serialize(file, data);
            file.Close();
        }
Exemplo n.º 2
0
        public static object GetFileContent(string fileName, FolderPaths path)
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = System.IO.File.Open(UnityFile.GetFolderPath(path) + "/" + fileName, FileMode.OpenOrCreate);

            var data = bf.Deserialize(file);

            file.Close();
            return(data);
        }
Exemplo n.º 3
0
 public static bool Exists(string fileName, FolderPaths path)
 {
     return(System.IO.File.Exists(UnityFile.GetFolderPath(path) + "/" + fileName));
 }