using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
public static class LocalSave
{
private static BinaryFormatter binaryFormatter = new BinaryFormatter();
/// <summary>
/// 二进制保存
/// </summary>
/// <param name="path">文件保存路径</param>
/// <param name="data">二进制数据</param>
public static void SaveByte(string path, byte[] data)
{
FileStream fileStream = new FileStream(Application.persistentDataPath + "/" + path, FileMode.Create);
fileStream.Write(data, 0, data.Length);
fileStream.Flush();
fileStream.Close();
}
/// <summary>
/// 二进制数据读取
/// </summary>
/// <param name="path">文件路径</param>
/// <re