300MB大小的AssetBundleDownload保存到内存后,该时间应用程序在IOS和Andriod Mobile上都崩溃了
void Save(byte[] data, string path)
{
if (!Directory.Exists(Path.GetDirectoryName(path)))
{
Directory.CreateDirectory(Path.GetDirectoryName(path));
}
try
{
File.WriteAllBytes(path, data); // crash on this line
Debug.Log("Saved Data to: " + path.Replace("/", "\\"));
}
catch (System.Exception e)
{
Debug.LogWarning("Failed To Save Data to: " + path.Replace("/", "\\"));
Debug.LogWarning("Error: " + e.Message);
}
}