I encountered an exception while following directions at https://github.com/nesrak1/AssetsTools.NET/wiki/Getting-Started:-Bundle-file-reading
var manager = new AssetsManager();
manager.LoadClassPackage(Path.Join(AppContext.BaseDirectory, "uncompressed.tpk"));
var bunInst = manager.LoadBundleFile(filePath, true);
int fileCount = bunInst.file.BlockAndDirInfo.DirectoryInfos.Count;
for (int i = 0; i < fileCount; i++)
{
if (!bunInst.file.IsAssetsFile(i))
{
continue;
}
var afileInst = manager.LoadAssetsFileFromBundle(bunInst, i, false);
AssetsFile afile = afileInst.file;
manager.LoadClassDatabaseFromPackage(afile.Metadata.UnityVersion);
foreach (var shader in afile.GetAssetsOfType(AssetClassID.Shader))
{
}
}
Unhandled exception. System.ArgumentOutOfRangeException: Non-negative number required. (Parameter 'capacity')
at AssetsTools.NET.AssetsFileMetadata.Read(AssetsFileReader reader, UInt32 version)
at AssetsTools.NET.Extra.AssetsManager.LoadAssetsFileFromBundle(BundleFileInstance bunInst, Int32 index, Boolean loadDeps)
scenes_interiors_scenes_all.zip
I encountered an exception while following directions at https://github.com/nesrak1/AssetsTools.NET/wiki/Getting-Started:-Bundle-file-reading
scenes_interiors_scenes_all.zip