Closed 28598519a closed 6 months ago
Use
if hasattr(data, "name"):
obj_name = getattr(data, “name”)
Since not every stuff has name.
Use
if hasattr(data, "name"): obj_name = getattr(data, “name”)
Since not every stuff has name.
and got
but in the first comment you can see it should has name AssetBundleManifest. Directly print shows NodeHelper has the key "name" with -> "AssetBundleManifest"
I will give you the sample file, unzip and load the file inside. FileToRead.zip
m_Name
has to be used instead of name
.
AssetBundleManifest is not hardcorded and get instead parsed via its typetree, which produces a class interface (NodeHelper) over a dict.
As the name
and m_Name
can be valid fields, I didn't add a wrapper for NodeHelper to prevent blocking access to a potential name
field.
Code![](https://github.com/K0lb3/UnityPy/assets/33422418/d0740af7-65a1-4a07-988c-a97285439dc0)
Error![](https://github.com/K0lb3/UnityPy/assets/33422418/61667e1e-b9b0-4acb-9f5b-c5f2db46583b)
To Reproduce