-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to read asset bundle #136
Comments
doing "var afileInst = manager.LoadAssetsFileFromBundle(bunInst, 0, false);" always just gives me the error "ArgumentNullException: Value cannot be null. |
Where did you get AssetsTools.NET from? The github releases page is out of date, so you should get it from nuget if you didn't already. The method you said is missing is there: AssetsTools.NET/AssetTools.NET/Standard/AssetsBundleFileFormat/AssetBundleFile.cs Line 772 in 2207c78
|
I got it from github, which would make sense the missing/outdated methods |
Im trying to modify an asset bundle, what im trying to do is modify some parameters on an animator controller of the asset bundle, i've been trying for 2 days to so much as read the asset bundle but nothing on the examples/documentation works
using the "Read Asset bundles" example but the code doesnt work
"var manager = new AssetsManager();
// Load the bundle file
var bunInst = manager.LoadBundleFile(assetURL, true);
foreach (var asset in bunInst.file.GetAllFileNames())
{
}
var afileInst = manager.LoadAssetsFileFromBundle(bunInst, 0, false);
var afile = afileInst.file;
// Loop through the textures and log their names and dimensions
foreach (var texInfo in afile.GetAssetsOfType(AssetClassID.Texture2D))
{
var texBase = manager.GetBaseField(afileInst, texInfo);
var name = texBase["m_Name"].AsString;
var width = texBase["m_Width"].AsInt;
var height = texBase["m_Height"].AsInt;
}"
these methods dont exist
The text was updated successfully, but these errors were encountered: