UnityPack
UnityPack copied to clipboard
All of my bundles can't be extracted.
Fails with different errors.
D:\Test>unityextract pirates_5d67f7b47ee4f4a78686c48f8926381d.unity3d
WARNING:root:-10551 absent from structs.dat
WARNING:root:8069 absent from structs.dat
WARNING:root:0 absent from structs.dat
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 119, in load
self.register_object(obj)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 158, in register_object
raise ValueError("Duplicate asset object: %r (path_id=%r)" % (obj, obj.path_id))
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\object.py", line 21, in __repr__
return "<%s %i>" % (self.type, self.class_id)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\object.py", line 28, in type
script = self.read()["m_Script"]
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\object.py", line 74, in read
return self.read_value(self.type_tree, buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\object.py", line 78, in read_value
t = type.type
AttributeError: 'NoneType' object has no attribute 'type'
D:\Test>unityextract sounds_38bcf14f388d4cc1dc43c8e658d5af16.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 132, in load
tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 32, in load
self.load_blob(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 69, in load_blob
parents.pop()
IndexError: pop from empty list
D:\Test>unityextract sounds_38bcf14f388d4cc1dc43c8e658d5af16.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 132, in load
tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 32, in load
self.load_blob(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 69, in load_blob
parents.pop()
IndexError: pop from empty list
D:\Test>unityextract indiana_f0b2dae294d7913662d096d515cc4e97.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 115, in load
self.target_platform = RuntimePlatform(buf.read_uint())
File "C:\Python36\lib\enum.py", line 291, in __call__
return cls.__new__(cls, value)
File "C:\Python36\lib\enum.py", line 533, in __new__
return cls._missing_(value)
File "C:\Python36\lib\enum.py", line 546, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 33 is not a valid RuntimePlatform
D:\Test>unityextract jungle_909c07a7482ae015500a4c472af38614.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 115, in load
self.target_platform = RuntimePlatform(buf.read_uint())
File "C:\Python36\lib\enum.py", line 291, in __call__
return cls.__new__(cls, value)
File "C:\Python36\lib\enum.py", line 533, in __new__
return cls._missing_(value)
File "C:\Python36\lib\enum.py", line 546, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 8404736 is not a valid RuntimePlatform
D:\Test>unityextract lobby_2678b6f86f5dbd5b5ac9a3076c5f9936.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 133, in load
ref.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 184, in load
self.file_path = buf.read_string()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 70, in read_string
ret = self.read_cstring()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 83, in read_cstring
c = self.read(1)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 60, in read
return self.buf.read(*args)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\assetbundle.py", line 188, in read
self.seek_to_block(self.cursor)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\assetbundle.py", line 235, in seek_to_block
self.current_stream = self.current_block.decompress(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\assetbundle.py", line 166, in decompress
res = lz4_decompress(buf.read(self.compressed_size), self.uncompressed_size)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 13, in lz4_decompress
return lz4.loads(data)
KeyboardInterrupt ----- too long ~5 minutes
D:\Test>unityextract musketeers_240083e70840140e8d06ed37cacbba13.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 140, in load
tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 34, in load
self.load_old(buf)
...
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 37, in load_old
self.type = buf.read_string()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 70, in read_string
ret = self.read_cstring()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 83, in read_cstring
c = self.read(1)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\utils.py", line 60, in read
return self.buf.read(*args)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\assetbundle.py", line 185, in read
buf = bytearray()
RecursionError: maximum recursion depth exceeded while calling a Python object
D:\Test>unityextract notredame_b4672ec2b2ce4e55bb36ee693e1b858a.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 115, in load
self.target_platform = RuntimePlatform(buf.read_uint())
File "C:\Python36\lib\enum.py", line 291, in __call__
return cls.__new__(cls, value)
File "C:\Python36\lib\enum.py", line 533, in __new__
return cls._missing_(value)
File "C:\Python36\lib\enum.py", line 546, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 4161536 is not a valid RuntimePlatform
D:\Test>unityextract promolastchance_22f9e9d5e32a4c5b429bbd273b89d3a4.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 132, in load
tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 32, in load
self.load_blob(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 69, in load_blob
parents.pop()
IndexError: pop from empty list
D:\Test>unityextract --all -o out robin_37f5fd552635c01cfccc0709d906825a.unity3d
Do nothing W/O Any output
D:\Test>unityextract windows_5626cce8f12bc07aabffb1c6d07ea5b0.unity3d
Traceback (most recent call last):
File "d:\Projects\bin\\unityextract.py", line 146, in <module>
main()
File "d:\Projects\bin\\unityextract.py", line 143, in main
exit(app.run())
File "d:\Projects\bin\\unityextract.py", line 56, in run
self.handle_asset(asset)
File "d:\Projects\bin\\unityextract.py", line 81, in handle_asset
for id, obj in asset.objects.items():
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 83, in objects
self.load()
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\asset.py", line 108, in load
self.tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 132, in load
tree.load(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 32, in load
self.load_blob(buf)
File "C:\Python36\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\type.py", line 69, in load_blob
parents.pop()
IndexError: pop from empty list
For example I provide one bundle with manifest Test.zip
Which game are those files from?
Can you send me musketeers_240083e70840140e8d06ed37cacbba13.unity3d as well as windows_5626cce8f12bc07aabffb1c6d07ea5b0.unity3d please.
Is from my game. I just want to know how Unity handles my bundles. And resources.
Can you send me musketeers_240083e70840140e8d06ed37cacbba13.unity3d as well as windows_5626cce8f12bc07aabffb1c6d07ea5b0.unity3d please.
Yep files.zip
I also provide you a manifest that describes bundle relations.
Hi, any news? You fix this issue?
Sorry, I can't look into this any time soon :/ but whenever I get back to this I'll take a look. Or maybe @ifeherva knows better.
You have any documents about Unity bundle structure? If I read may be I can help also.
Not really, documentation is nearly nonexistant. It's all reverse engineering work.
@doterax nah, I was mistaken :)
UnityFS 5.x.x 5.5.0p4 is in header.
@Stellarspace so what?
@doterax Is that even supported?
Some of these issues are fixed by 11c22bc. There are, however, still further issues reading some of the objects that I'll have to look into when I get more time.
After fixing the Object reading issue, there are two remaining errors here:
- unityextract can't handle the shader format introduced in Unity 5.5:
Traceback (most recent call last):
File "../../bin/unityextract", line 100, in handle_asset
self.write_to_file(d.name + ".cg", d.script)
File "/usr/lib/python3.4/site-packages/unitypack-0.7.2-py3.4.egg/unitypack/engine/object.py", line 6, in _inner
ret = self._obj[f]
KeyError: 'm_Script'
- The external file references in these assetbundles aren't being resolved correctly:
Traceback (most recent call last):
File "../../bin/unityextract", line 86, in handle_asset
d = obj.read()
File "/usr/lib/python3.4/site-packages/unitypack-0.7.2-py3.4.egg/unitypack/object.py", line 81, in read
return self.read_value(self.type_tree, BinaryReader(BytesIO(object_buf)))
File "/usr/lib/python3.4/site-packages/unitypack-0.7.2-py3.4.egg/unitypack/object.py", line 143, in read_value
result[child.name] = self.read_value(child, buf)
File "/usr/lib/python3.4/site-packages/unitypack-0.7.2-py3.4.egg/unitypack/object.py", line 148, in read_value
result.asset = self.asset.get_asset(result.source)
File "/usr/lib/python3.4/site-packages/unitypack-0.7.2-py3.4.egg/unitypack/asset.py", line 61, in get_asset
return self.environment.get_asset(path)
File "/usr/lib/python3.4/site-packages/unitypack-0.7.2-py3.4.egg/unitypack/environment.py", line 71, in get_asset
raise NotImplementedError("Cannot find %r in %r" % (archive, self.bundles))
NotImplementedError: Cannot find 'buildplayer-musketeers' in {'buildplayer-musketeers.sharedassets': <AssetBundle 'BuildPlayer-Musketeers.sharedAssets'>}
Hey. Yeah I am trying to export the shaders and having the same issues. Any luck with this?
unityextract can't handle the shader format introduced in Unity 5.5:
I can confirm this issue is still there