AssetsTools.NET
AssetsTools.NET copied to clipboard
System.OutOfMemoryException when Unpack
I am trying to uncompress the bundle files because I can't read the compressed files. This code:
AssetsManager helper = new AssetsManager();
helper.LoadClassPackage("classdata.tpk");
var inst = helper.LoadBundleFile(inputFilename, false);
var file = inst.file;
if (file.bundleHeader6.GetCompressionType() == 0) return;
using (FileStream stream = File.Open(outputFilename, FileMode.Create, FileAccess.ReadWrite))
{
file.reader.Position = 0;
file.Unpack(file.reader, new AssetsFileWriter(stream));
stream.Position = 0;
}
With reference from NuGet crash with message for a bundle file of 900MB but not with a bundle of 6MB System.OutOfMemoryException in AssetsTools.NET.AssetBundleFile.Unpack(AssetsFileReader reader, AssetsFileWriter writer) same error from version 2.0.7 to 2.0.9
but work correctly if i donwload the source code and add to my tool the AssetsTools.NET.csproj project
compile as 64 bit