Code Monkey home page Code Monkey logo

unitypack's Introduction

UnityPack

Build Status

A library to deserialize Unity3D Assets and AssetBundles files (*.unity3d).

Dependencies

How Unity packs assets

Most extractors for Unity3D files (such as Disunity) deal with the format as a "file store", treating it as one would treat a zip. This is not how the format actually works.

Unity files are binary-packed, serialized collections of Unity3D classes. To this end, they are much closer to a json file containing arrays of objects.

Some of those classes have fields which contain raw data, such as Texture2D's image data field or TextAsset's m_Script field. Using this, files can be "extracted" from the asset bundles by using their m_Name and an appropriate extension. But doing so leaves out all the "unextractable" classes which one might want to deal with.

Usage

To open an asset, or asset bundle, with unitypack:

import unitypack

with open("example.unity3d", "rb") as f:
	bundle = unitypack.load(f)

	for asset in bundle.assets:
		print("%s: %s:: %i objects" % (bundle, asset, len(asset.objects)))

The objects field on every Asset is a dictionary of path_id keys to ObjectInfo values. The path_id is a unique 64-bit signed int which represents the object instance. The ObjectInfo class is a lazy lookup for the data on that object.

Thus, if you want to actually extract the data:

for id, object in asset.objects.items():
	# Let's say we only want TextAsset objects
	if object.type == "TextAsset":
		# We avoid reading the data, unless it's a TextAsset
		data = object.read()
		# The resulting `data` is a unitypack.engine.TextAsset instance
		print("Asset name:", data.name)
		print("Contents:", repr(data.script))

Not all base Unity3D classes are implemented. If a class is unimplemented, or a custom class (eg. a non-Unity class) is encountered, the resulting data is a dict of the fields instead. The same dict of fields can be found in the _obj attribute of the instance, otherwise.

Included tools

Included are two scripts which use unitypack for some common operations:

Asset extraction

unityextract can extract common types of data from assets and asset bundles, much like Disunity. By default, it will extract all known extractable types:

  • AudioClip objects will be converted back to their original format. Note that recent Unity3D versions pack these as FSB files, so python-fsb5 is required to convert them back.
  • Texture2D objects will be converted to png files. Not all Texture2D formats are supported. Pillow version >= 3.4 is required for this. decrunch is required for DXT1Crunched / DXT5Crunched.
  • Mesh objects (3D objects) will be pickled. Pull requests implementing a .obj converter are welcome and wanted.
  • TextAsset objects will be extracted as plain text, to .txt files
  • Shader objects work essentially the same way as TextAsset objects, but will be extracted to .cg files.

Filters for individual formats are available. Run unityextract --help for the full list.

YAML conversion

unity2yaml can convert AssetBundles to YAML output. YAML is more appropriate than JSON due to the recursive, pointer-heavy and class-heavy nature of the Unity3D format.

When run with the --strip argument, extractable data will be stripped out. This can make the resulting YAML output far less heavy, as binary data will otherwise be converted to Base64 which can result in extremely large text output.

Here is a stripped example of the movies0.unity3d file from Hearthstone, which contains only two objects (a MovieTexture cinematic and a corresponding AudioClip):

!unitypack:AudioClip
m_BitsPerSample: 16
m_Channels: 0
m_CompressionFormat: 0
m_Frequency: 0
m_IsTrackerFormat: false
m_Legacy3D: false
m_Length: 0.0
m_LoadInBackground: false
m_LoadType: 0
m_Name: Cinematic audio
m_PreloadAudioData: true
m_Resource: !unitypack:StreamedResource {m_Offset: 0, m_Size: 0, m_Source: ''}
m_SubsoundIndex: 0

m_AssetBundleName: ''
m_Container:
- first: final/data/movies/cinematic.unity3d
  second:
    asset: !PPtr [0, -4923783912342650895]
    preloadIndex: 0
    preloadSize: 2
m_Dependencies: []
m_IsStreamedSceneAssetBundle: false
m_MainAsset: {asset: null, preloadIndex: 0, preloadSize: 0}
m_Name: ''
m_PreloadTable:
- !PPtr [0, -6966092991433622133]
- !PPtr [0, -4923783912342650895]
m_RuntimeCompatibility: 1

!unitypack:stripped:MovieTexture
m_AudioClip: !PPtr [0, -6966092991433622133]
m_ColorSpace: 1
m_Loop: false
m_MovieData: <stripped>
m_Name: Cinematic

Stripped classes will be prefixed with unitypack:stripped:.

License

python-unitypack is licensed under the terms of the MIT license. The full license text is available in the LICENSE file.

Community

python-unitypack is a HearthSim project. All development happens on our IRC channel #hearthsim on Freenode.

Contributions are welcome. Make sure to read through the CONTRIBUTING.md first.

unitypack's People

Contributors

andyearnshaw avatar beheh avatar hklindworth avatar ifeherva avatar ishitatsuyuki avatar jleclanche avatar joolean avatar raijinili avatar richardgale avatar robert-nix avatar stevenvergenz avatar synap5e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unitypack's Issues

Object has no attribute 'read_uint'

Hi! ๐Ÿ‘‹

I've just installed UnityPack and when trying to run unityextract I get the following error message:

# micpringle at homer.local in ~/Desktop [12:00:51]
โ†’ unityextract resources.assets
Traceback (most recent call last):
  File "/usr/local/bin/unityextract", line 4, in <module>
    __import__('pkg_resources').run_script('unitypack==0.6.1', 'unityextract')
  File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1494, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.5/site-packages/unitypack-0.6.1-py3.5.egg/EGG-INFO/scripts/unityextract", line 146, in <module>
    main()
  File "/usr/local/lib/python3.5/site-packages/unitypack-0.6.1-py3.5.egg/EGG-INFO/scripts/unityextract", line 143, in main
    exit(app.run())
  File "/usr/local/lib/python3.5/site-packages/unitypack-0.6.1-py3.5.egg/EGG-INFO/scripts/unityextract", line 49, in run
    self.handle_asset(asset)
  File "/usr/local/lib/python3.5/site-packages/unitypack-0.6.1-py3.5.egg/EGG-INFO/scripts/unityextract", line 81, in handle_asset
    for id, obj in asset.objects.items():
  File "/usr/local/lib/python3.5/site-packages/unitypack-0.6.1-py3.5.egg/unitypack/asset.py", line 83, in objects
    self.load()
  File "/usr/local/lib/python3.5/site-packages/unitypack-0.6.1-py3.5.egg/unitypack/asset.py", line 98, in load
    self.metadata_size = buf.read_uint()
AttributeError: '_io.BufferedReader' object has no attribute 'read_uint'

I'm running Python 3.5.2:

โ†’ python3 -V
Python 3.5.2

And here's a list of my installed packages:

โ†’ pip3 list
lz4 (0.8.2)
pip (9.0.1)
setuptools (30.2.0)
unitypack (0.6.1)
wheel (0.29.0)

Any help would be greatly appreciated. Thx!

(UnityExtract) Class ID: KeyError: -14

UnityPack Version:0.8.1
file: https://drive.google.com/open?id=1u39GZ2llpNWJAH80rrjtvnZxPYz4SGMP

How to skip classes with id <0?

WARNING:root:-14 absent from structs.dat
WARNING:root:-6 absent from structs.dat
WARNING:root:-16 absent from structs.dat
WARNING:root:-10 absent from structs.dat
WARNING:root:-22 absent from structs.dat
WARNING:root:-33 absent from structs.dat
WARNING:root:-9 absent from structs.dat
WARNING:root:-18 absent from structs.dat
WARNING:root:-25 absent from structs.dat
WARNING:root:-8 absent from structs.dat
WARNING:root:-3 absent from structs.dat
WARNING:root:-23 absent from structs.dat
WARNING:root:-32 absent from structs.dat
WARNING:root:-31 absent from structs.dat
WARNING:root:-12 absent from structs.dat
WARNING:root:-28 absent from structs.dat
WARNING:root:-19 absent from structs.dat
WARNING:root:-20 absent from structs.dat
WARNING:root:-30 absent from structs.dat
WARNING:root:-29 absent from structs.dat
WARNING:root:-4 absent from structs.dat
WARNING:root:-2 absent from structs.dat
WARNING:root:-15 absent from structs.dat
WARNING:root:-27 absent from structs.dat
WARNING:root:-24 absent from structs.dat
WARNING:root:-17 absent from structs.dat
WARNING:root:-35 absent from structs.dat
WARNING:root:-7 absent from structs.dat
WARNING:root:-26 absent from structs.dat
WARNING:root:-5 absent from structs.dat
WARNING:root:-21 absent from structs.dat
WARNING:root:-11 absent from structs.dat
WARNING:root:-13 absent from structs.dat
WARNING:root:-34 absent from structs.dat
Traceback (most recent call last):
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin\unityextract", line 173, in
main()
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin\unityextract", line 169, in main
exit(app.run())
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin\unityextract", line 74, in run
self.handle_asset(asset)
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin\unityextract", line 107, in handle_asset
if obj.type not in self.handle_formats:
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin..\unitypack\object.py", line 30, in type
script = self.read()["m_Script"]
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin..\unitypack\object.py", line 84, in read
return self.read_value(self.type_tree, BinaryReader(BytesIO(object_buf)))
File "d:\Projects\Other\UNITYPACK\UnityPack-master\bin..\unitypack\object.py", line 51, in type_tree
return TypeMetadata.default(self.asset).type_trees[self.class_id]
KeyError: -14

Support for TextureFormat.PVRTC_RGBA4

I get this for certain texture assets in some of the bundles I'm extracting:

NotImplementedError: Unimplemented format <TextureFormat.PVRTC_RGBA4: 33>

It would be great if this format could be supported in the future.

WARNING:root:StreamedResource not available without bundle

UnityPack should support extracting FSBs from an .assets file as long as there is a .resources file with the same name in the same directory.
eg.

sharedassets0.assets
sharedassets0.resource
sharedassets1.assets
sharedassets1.resource

The Unity script for QuickBMS takes this into account, I don't see why extract.py couldn't.

Texture decoding changes

patch for use with my dxtc branch of Pillow; need to make a PR when #2068 is merged

diff --git a/unitypack/engine/texture.py b/unitypack/engine/texture.py
index 8f87fc7..1434854 100644
--- a/unitypack/engine/texture.py
+++ b/unitypack/engine/texture.py
@@ -1,6 +1,5 @@
 import struct
 from enum import IntEnum
-from io import BytesIO
 from .object import Object, field


@@ -117,6 +116,7 @@ class Texture2D(Texture):
    texture_dimension = field("m_TextureDimension")
    mipmap = field("m_MipMap")
    complete_image_size = field("m_CompleteImageSize")
+   stream_data = field("m_StreamData")

    def __repr__(self):
        return "<%s %s (%s %ix%i)>" % (
@@ -124,17 +124,11 @@ class Texture2D(Texture):
        )

    @property
-   def decoded_data(self):
-       from PIL.DdsImagePlugin import _dxt1, _dxt5
+   def image_data(self):
+       if self.stream_data and self.stream_data['path']:
+           return self.asset.environment.get_stream(self.stream_data['path'], self.stream_data['offset'], self.stream_data['size'])

-       if self.format == TextureFormat.DXT1:
-           codec = _dxt1
-       elif self.format == TextureFormat.DXT5:
-           codec = _dxt5
-       else:
-           return self.data
-
-       return codec(BytesIO(self.data), self.width, self.height)
+       return self.data

    @property
    def image(self):
@@ -146,9 +140,17 @@ class Texture2D(Texture):
        size = (self.width, self.height)
        raw_mode = self.format.pixel_format
        mode = "RGB" if raw_mode == "RGB" else "RGBA"
-       data = bytes(self.decoded_data)
+       codec = "raw"
+       args = (raw_mode)
+       if self.format == TextureFormat.DXT1:
+           codec = "bcn"
+           args = (1)
+       elif self.format == TextureFormat.DXT5:
+           codec = "bcn"
+           args = (3)
+       data = bytes(self.image_data)

        if not data and size == (0, 0):
            return None

-       return Image.frombytes(mode, size, data, "raw", raw_mode)
+       return Image.frombytes(mode, size, data, codec, args)

Question

I don't know how else to contact you, but how did you find out the format that unity saved it's assets? Did you look at unities source code or something?

Format 17 with external files

I'm trying to extract images from the Zombicide Android app. This app has an obb file which can be extracted using zip.
After extracting I got a lot of files.
There are sharedassets1.assets.splitXX where XX is a number. I've joined them using cat since UnityPack seems it can't handle split files. I've already done this with an older version of the app using disunity and it worked fine.
Additional there are a lot of files which are named by 16 byte hex strings. If I search for those strings in sharedassets1.assets you can find them all in this file.
Before all those files start in the sharedassets1.assets I can read: resources/unity_builtin_extra
So I think they are related to the assets.

It's using Unity format 17.

If I try to extract I get this error:
File "/usr/local/lib/python3.5/dist-packages/unitypack-0.6.1-py3.5.egg/unitypack/utils.py", line 104, in read_int
return struct.unpack(self.endian + "i", self.read(4))[0]
struct.error: unpack requires a bytes object of length 4

Problem extracting assets from a UnityWeb file

UnityPack: 0.8.1

I am having some problems extracting assets from a UnityWeb file.
It throws this exception on asset.objects.items():

Traceback (most recent call last):
  File ".\example.py", line 8, in <module>
    for id, object in asset.objects.items():
  File "C:\Users\Rangedz\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\asset.py", line 83, in objects
    self.load()
  File "C:\Users\Rangedz\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\asset.py", line 99, in load
    self.metadata_size = buf.read_uint()
  File "C:\Users\Rangedz\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\utils.py", line 105, in read_uint
    return struct.unpack(self.endian + "I", self.read(4))[0]
struct.error: unpack requires a buffer of 4 bytes

I tried opening it with Unity Assets Bundle Extractor and it seemed to work correctly, so I don't think there is anything wrong with the file.
uabe

UnityWeb File: https://drive.google.com/file/d/19N-tjWW1cjIXKbSprvhWQSAyGcdkee-u/view?usp=sharing

Code used:

import unitypack

with open("Event2d.unity3d", "rb") as f:
	bundle = unitypack.load(f)
	
	for asset in bundle.assets:
		for id, object in asset.objects.items():
			print(id,object.type)

Mistake? `read_cstring` error message uses `list` instead of `bytes`.

raise ValueError("Unterminated string: %r" % (ret))

Shouldn't the error message use b"".join first? As is, the value is a bunch of single-byte strings.

Possible correction:

def read_cstring(self) -> bytes:
	retlst = []
	c = self.read(1)
	while c and c != b"\0":
		retlst.append(c)
		c = self.read(1)
	ret = "".join(retlst)
	if not c:
		raise ValueError("Unterminated string: %r" % (ret))
	return ret

load assetbundle error

I'm trying loading a assetbundle with header UnityFS 5.x.x 5.4.1f1 but got error

Traceback (most recent call last):
  File "test.py", line 10, in <module>
    print(id, object.type)
  File "/home/tangpei/ๆ–‡ๆกฃ/UnityPack/unitypack/object.py", line 28, in type
    script = self.read()["m_Script"]
  File "/home/tangpei/ๆ–‡ๆกฃ/UnityPack/unitypack/object.py", line 74, in read
    return self.read_value(self.type_tree, buf)
  File "/home/tangpei/ๆ–‡ๆกฃ/UnityPack/unitypack/object.py", line 132, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/home/tangpei/ๆ–‡ๆกฃ/UnityPack/unitypack/object.py", line 101, in read_value
    result = buf.read_string(size)
  File "/home/tangpei/ๆ–‡ๆกฃ/UnityPack/unitypack/utils.py", line 70, in read_string
    ret = struct.unpack(self.endian + "%is" % (size), self.read(size))[0]
struct.error: unpack requires a bytes object of length 3410181934

001_school_winter.zip

Error getting type of internal Unity asset "library/unity default resources"

Calling ObjectInfo.type on the "library/unity default resources" asset raises the error below. This asset occurs in Hearthstone's gameobject0 bundle, causing unityextract to fail.

Traceback (most recent call last):
  File ".\bin\unityextract", line 146, in <module>
    main()
  File ".\bin\unityextract", line 143, in main
    exit(app.run())
  File ".\bin\unityextract", line 56, in run
    self.handle_asset(asset)
  File ".\bin\unityextract", line 82, in handle_asset
    if obj.type not in self.handle_formats:
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 31, in type
    typename = script.resolve()["m_ClassName"]
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 174, in resolve
    return self.object.read()
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 167, in object
    return self.asset.objects[self.path_id]
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 162, in asset
    ret = ret.resolve()
  File "h:\hearthsim\python-unitypack\unitypack\asset.py", line 173, in resolve
    return self.source.get_asset(self.file_path)
  File "h:\hearthsim\python-unitypack\unitypack\asset.py", line 63, in get_asset
    return self.environment.get_asset_by_filename(path)
  File "h:\hearthsim\python-unitypack\unitypack\environment.py", line 46, in get_asset_by_filename
    raise KeyError("No such asset: %r" % (name))
KeyError: "No such asset: 'library/unity default resources'"

Issue when trying to extract uiscreens0.unity3d

The extract.py script fails with the following traceback:

Traceback (most recent call last):
  File "extract.py", line 98, in <module>
    main()
  File "extract.py", line 94, in main
    handle_asset(asset)
  File "extract.py", line 37, in handle_asset
    if obj.type not in SUPPORTED_FORMATS:
  File "f:\python\python-unitypack\unitypack\__init__.py", line 196, in type
    typename = script.resolve()["m_ClassName"]
AttributeError: 'NoneType' object has no attribute 'resolve'

UnityPack does not work

I created a file "extract unity3d.py"
I wrote there :

import unitypack

with open("movies0.unity3d", "rb") as f:
	bundle = unitypack.load(f)

	for asset in bundle.assets:
		print("%s: %s:: %i objects" % (bundle, asset, len(asset.objects)))

for id, object in asset.objects.items():
	# Let's say we only want TextAsset objects
	if object.type == "TextAsset":
		# We avoid reading the data, unless it's a TextAsset
		data = object.read()
		# The resulting `data` is a unitypack.engine.TextAsset instance
		print("Asset name:", data.name)
		print("Contents:", repr(data.script))

I have installed python 3.6 as well as libraries with pip:

  • Unitypack (0.7.2)
  • lz4 (0.9.0)
  • Pillow (4.0.0)
  • decrunch [unknown 0.0.0]
    Bur the "decrunch" library installs by calling itself unknown.
    I have the following error message :
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 
======== RESTART: C:\Users\Administrateur\Desktop\extract unity3d.py ========
Traceback (most recent call last):
  File "C:\Users\Administrateur\Desktop\extract unity3d.py", line 1, in <module>
    import unitypack
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\unitypack\__init__.py", line 4, in <module>
    __version__ = pkg_resources.require("unitypack")[0].version
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 967, in require
    needed = self.resolve(parse_requirements(requirements))
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 853, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'decrunch' distribution was not found and is required by unitypack
>>> 

You have an idea of what I can do?

Translate by Google Translate

Improve structs.dat handling

We should have a system which lets us load different structs.dat files for different unity versions. Newer ones aren't fully compatible with older ones.

Error when loading bundle file

>>> bundle=unitypack.load(f)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jack980517/python-modules/UnityPack/unitypack/__init__.py", line 11, in load
    return env.load(file)
  File "/home/jack980517/python-modules/UnityPack/unitypack/environment.py", line 21, in load
    ret.load(file)
  File "/home/jack980517/python-modules/UnityPack/unitypack/assetbundle.py", line 36, in load
    self.signature = buf.read_string()
  File "/home/jack980517/python-modules/UnityPack/unitypack/utils.py", line 70, in read_string
    ret = self.read_cstring()
  File "/home/jack980517/python-modules/UnityPack/unitypack/utils.py", line 83, in read_cstring
    c = self.read(1)
  File "/home/jack980517/python-modules/UnityPack/unitypack/utils.py", line 60, in read
    return self.buf.read(*args)
  File "/usr/lib64/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9d in position 37: invalid start byte

Publish a new PyPI release

It looks like it's been two months there were no new UnityPack release. However, I see in the commits list there were several bugfixes.

Is it possible to publish a new PyPi release with those fixes?

PS: awesome work, this project rocks!

Parsing object tree

This isn't so much an issue as it is a request for guidance. I have a web application I'm writing in java that uses the api of a mobile game I play to display in-game information without actually being in game.

Part of this is getting all the image assets from the game, so I'm working on porting the unity asset bundle extraction / parsing from various sources online and this project has been the most useful. For not knowing Python (hearthsim) or javascript (another project), I think I'm doing a pretty decent job of following what's going on, as I'm all the way through to ObjectInfo.load at this point (from Object.py).

First of all, as an aside, I'm not sure what to do about the 1300 bytes of all zeros from the point where the object meta data appears to end, to where the first object tree actually begins.

Anyhow, the more important part is that I'm having a little trouble following what's going on when it comes to actually parsing the object tree. It seems to involve the methods on line 80 and 86 in Object.py, but, as mentioned, since I don't know Python I'm having trouble seeing how goes from finishing object meta data (ObjectInfo.load()), to reaching ObjectInfo.read() and ObjectInfo.read_value(), although I do gather that ObjectInfo.read() seems to load the actual object block into a buffer. Do you have a more straightforward flow of how to parse the actual object tree, hopefully that's java (or c/c++) friendly?

Add support for extracting, modifying, and packing.

Also support for .dll's
Then we could modify any unity3d game (create mods), or hack reverse-engineer for educational purpose.
You can add this functionality for games with Unity3D 5+, because Unity3D is the most popular version of Unity now.
All this features was in disunity (java), but it was supporting unity 3d up to latest 4 version, but not 5 (only alpha)

KeyError when extracting spells0.unity3d

For example if I try to run bin/unityextract with spells0.unity3d:

Traceback (most recent call last):
  File "unityextract", line 146, in <module>
    main()
  File "unityextract", line 143, in main
    exit(app.run())
  File "unityextract", line 56, in run
    self.handle_asset(asset)
  File "unityextract", line 82, in handle_asset
    if obj.type not in self.handle_formats:
  File "<snip>/unitypack/object.py", line 35, in type
    typename = self.asset.tree.type_trees[-150].type
KeyError: -150

Installation error

I get an installation error when trying to install unitypack via pip3.

sudo pip3 install unitypack
Collecting unitypack
  Using cached unitypack-0.7.2-py3-none-any.whl
Requirement already satisfied: fsb5 in /usr/lib/python3.5/site-packages (from unitypack)
Collecting decrunch (from unitypack)
  Using cached decrunch-0.3.0.tar.gz
Requirement already satisfied: Pillow in /usr/lib/python3.5/site-packages (from unitypack)
Collecting lz4 (from unitypack)
  Using cached lz4-0.9.0.tar.gz
Requirement already satisfied: olefile in /usr/lib/python3.5/site-packages (from Pillow->unitypack)
Installing collected packages: decrunch, lz4, unitypack
  Running setup.py install for decrunch ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vqjhr4nm/decrunch/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ut403uny-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'decrunch' extension
    creating build
    creating build/temp.linux-x86_64-3.5
    x86_64-unknown-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -fPIC -Icrunch -I/usr/include/python3.5m -c crn_decomp.cpp -o build/temp.linux-x86_64-3.5/crn_decomp.o
    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
    In file included from crn_decomp.cpp:10:0:
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<bool>::destruct(bool*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:536:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(bool)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<bool>::destruct_array(bool*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:536:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(bool)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:536:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(bool)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<char>::destruct(char*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:537:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(char)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<char>::destruct_array(char*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:537:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(char)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:537:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(char)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<unsigned char>::destruct(unsigned char*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:538:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned char)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<unsigned char>::destruct_array(unsigned char*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:538:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned char)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:538:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned char)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<short int>::destruct(short int*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:539:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(short)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<short int>::destruct_array(short int*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:539:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(short)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:539:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(short)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<short unsigned int>::destruct(short unsigned int*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:540:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned short)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<short unsigned int>::destruct_array(short unsigned int*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:540:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned short)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:540:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned short)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<int>::destruct(int*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:541:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(int)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<int>::destruct_array(int*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:541:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(int)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:541:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(int)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<unsigned int>::destruct(unsigned int*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:542:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned int)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<unsigned int>::destruct_array(unsigned int*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:542:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned int)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:542:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned int)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long int>::destruct(long int*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:543:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(long)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long int>::destruct_array(long int*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:543:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(long)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:543:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(long)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long unsigned int>::destruct(long unsigned int*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:544:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned long)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long unsigned int>::destruct_array(long unsigned int*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:544:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned long)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:544:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(unsigned long)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long long int>::destruct(crnd::int64*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:545:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(int64)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long long int>::destruct_array(crnd::int64*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:545:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(int64)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:545:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(int64)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long long unsigned int>::destruct(crnd::uint64*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:546:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(uint64)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long long unsigned int>::destruct_array(crnd::uint64*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:546:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(uint64)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:546:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(uint64)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<float>::destruct(float*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:547:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(float)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<float>::destruct_array(float*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:547:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(float)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:547:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(float)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<double>::destruct(double*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:548:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(double)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<double>::destruct_array(double*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:548:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(double)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:548:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(double)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long double>::destruct(long double*)':
    crunch/crn_decomp.h:533:41: warning: statement has no effect [-Wunused-value]
        static inline void destruct(X* p) { p; } \
                                             ^
    crunch/crn_decomp.h:549:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(long double)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h: In static member function 'static void crnd::scalar_type<long double>::destruct_array(long double*, crnd::uint32)':
    crunch/crn_decomp.h:534:59: warning: left operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                               ^
    crunch/crn_decomp.h:549:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(long double)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    crunch/crn_decomp.h:534:60: warning: right operand of comma operator has no effect [-Wunused-value]
        static inline void destruct_array(X* p, uint32 n) { p, n; } };
                                                                ^
    crunch/crn_decomp.h:549:4: note: in expansion of macro 'CRND_DEFINE_BUILT_IN_TYPE'
        CRND_DEFINE_BUILT_IN_TYPE(long double)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from crn_decomp.cpp:10:0:
    crunch/crn_decomp.h: In function 'void crnd::crnd_output_debug_string(const char*)':
    crunch/crn_decomp.h:2405:8: warning: statement has no effect [-Wunused-value]
           p;
            ^
    crunch/crn_decomp.h: In function 'void* crnd::crnd_default_realloc(void*, size_t, size_t*, bool, void*)':
    crunch/crn_decomp.h:2420:17: warning: statement has no effect [-Wunused-value]
           pUser_data;
                     ^
    crunch/crn_decomp.h: In function 'size_t crnd::crnd_default_msize(void*, void*)':
    crunch/crn_decomp.h:2479:17: warning: statement has no effect [-Wunused-value]
           pUser_data;
                     ^
    crunch/crn_decomp.h: In function 'const crnd::crn_header* crnd::crnd_get_header(crnd::crn_header&, const void*, crnd::uint32)':
    crunch/crn_decomp.h:2687:7: warning: statement has no effect [-Wunused-value]
           tmp_header;
           ^~~~~~~~~~
    crunch/crn_decomp.h: In member function 'bool crnd::crn_unpacker::unpack_level(const void*, crnd::uint32, void**, crnd::uint32, crnd::uint32, crnd::uint32)':
    crunch/crn_decomp.h:3707:27: warning: statement has no effect [-Wunused-value]
              dst_size_in_bytes;
                               ^
    crunch/crn_decomp.h: In member function 'bool crnd::crn_unpacker::unpack_dxt1(crnd::uint8**, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32)':
    crunch/crn_decomp.h:4142:27: warning: statement has no effect [-Wunused-value]
              dst_size_in_bytes;
                               ^
    crunch/crn_decomp.h: In member function 'bool crnd::crn_unpacker::unpack_dxt5(crnd::uint8**, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32)':
    crunch/crn_decomp.h:4328:27: warning: statement has no effect [-Wunused-value]
              dst_size_in_bytes;
                               ^
    crunch/crn_decomp.h: In member function 'bool crnd::crn_unpacker::unpack_dxn(crnd::uint8**, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32)':
    crunch/crn_decomp.h:4471:27: warning: statement has no effect [-Wunused-value]
              dst_size_in_bytes;
                               ^
    crunch/crn_decomp.h: In member function 'bool crnd::crn_unpacker::unpack_dxt5a(crnd::uint8**, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32, crnd::uint32)':
    crunch/crn_decomp.h:4613:27: warning: statement has no effect [-Wunused-value]
              dst_size_in_bytes;
                               ^
    In file included from crn_decomp.cpp:10:0:
    crunch/crn_decomp.h: In instantiation of 'void crnd::crnd_delete_array(T*) [with T = unsigned int]':
    crunch/crn_decomp.h:1916:42:   required from here
    crunch/crn_decomp.h:653:10: warning: statement has no effect [-Wunused-value]
              num_check;
              ^~~~~~~~~
    crunch/crn_decomp.h: In instantiation of 'void crnd::crnd_delete_array(T*) [with T = short unsigned int]':
    crunch/crn_decomp.h:1923:55:   required from here
    crunch/crn_decomp.h:653:10: warning: statement has no effect [-Wunused-value]
    crunch/crn_decomp.h: In instantiation of 'void crnd::helpers::destruct(T*) [with T = crnd::prefix_coding::decoder_tables]':
    crunch/crn_decomp.h:641:27:   required from 'void crnd::crnd_delete(T*) [with T = crnd::prefix_coding::decoder_tables]'
    crunch/crn_decomp.h:2927:35:   required from here
    crunch/crn_decomp.h:488:10: warning: statement has no effect [-Wunused-value]
              p;
              ^
    crunch/crn_decomp.h: In instantiation of 'void crnd::helpers::destruct(T*) [with T = crnd::crn_unpacker]':
    crunch/crn_decomp.h:641:27:   required from 'void crnd::crnd_delete(T*) [with T = crnd::crn_unpacker]'
    crunch/crn_decomp.h:4739:23:   required from here
    crunch/crn_decomp.h:488:10: warning: statement has no effect [-Wunused-value]
    x86_64-unknown-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -fPIC -Icrunch -I/usr/include/python3.5m -c decrunch.cpp -o build/temp.linux-x86_64-3.5/decrunch.o
    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
    decrunch.cpp:19:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'x86_64-unknown-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vqjhr4nm/decrunch/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ut403uny-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-vqjhr4nm/decrunch/

Running Void Linux here, kernel 4.10.13_1.
Python version 3.5.3
I tried to install decrunch manually but i get the same error.

"struct.error: unpack requires a bytes object of length 5" problem

For some unity files, unityextract prints following error,

struct.error: unpack requires a bytes object of length 5

I'm not familiar to python syntax (such as * notation), so I'm just pasting my quick fix of this problem.
I refered this url:
http://stackoverflow.com/questions/5773607/python-what-is-the-most-efficient-way-to-generate-padding

In utils.py,

def read(self, *args):
  return self.buf.read(*args)

to this:

def read(self, args):
  readResult = self.buf.read(args)
  if (len(readResult) < args):
    readResult = readResult .ljust(args, b'\0')
  return readResult 

I omitted * of args for just make it run with least effort ;). Sorry for that.
Sorry for not uploading problematic asset file, for it's confidential one.

Thank you.

Processing RGBA4444

I met a problem when i'm unpacking textures formatted with RGBA4444. The unpacked images have a color problem obviously.

When I swapping the color channels from RGBA to ABGR, the problem solved.

snipaste_2018-02-02_13-56-41

I don't know the definition of RGBA4444. I don't know the swapping channel just appears in the game I unpacked or Unity defines it in this way. So I prefer to open an issue rather than open a pr.

I fix the problem in my fork moesoha/UnityPack:fix-rgba4444.

ModuleNotFoundError: No module named 'unitypack'

I have all of the requirements installed, but when I try to run any of the unityextract commands I get the following error. I am using windows 10. What am I doing wrong? I also ran setup.py and it worked fine

python unityextract --help
Traceback (most recent call last):
File "unityextract", line 5, in
import unitypack
ModuleNotFoundError: No module named 'unitypack'

Extract Scene

Hello! Is it possible to somehow add the decompilation of the scene so that it is possible to add it to the project?

Problem with lz4 compressed file "invalid RuntimePlatform"

https://puu.sh/sThVg/30d18719f4.zip

smilies.bundle fails with

Traceback (most recent call last):
  File "D:\Users\Kim\Documents\DuOS-shared\bundles\unityextract.py", line 146, in <module>
    main()
  File "D:\Users\Kim\Documents\DuOS-shared\bundles\unityextract.py", line 143, in main
    exit(app.run())
  File "D:\Users\Kim\Documents\DuOS-shared\bundles\unityextract.py", line 53, in run
    bundle = unitypack.load(f)
  File "D:\Python\Python35\lib\site-packages\unitypack\__init__.py", line 11, in load
    return env.load(file)
  File "D:\Python\Python35\lib\site-packages\unitypack\environment.py", line 21, in load
    ret.load(file)
  File "D:\Python\Python35\lib\site-packages\unitypack\assetbundle.py", line 40, in load
    self.load_unityfs(buf)
  File "D:\Python\Python35\lib\site-packages\unitypack\assetbundle.py", line 120, in load_unityfs
    asset.load(asset.data)
  File "D:\Python\Python35\lib\site-packages\unitypack\asset.py", line 94, in load
    self.tree.load(buf)
  File "D:\Python\Python35\lib\site-packages\unitypack\type.py", line 115, in load
    self.target_platform = RuntimePlatform(buf.read_uint())
  File "D:\Python\Python35\lib\enum.py", line 241, in __call__
    return cls.__new__(cls, value)
  File "D:\Python\Python35\lib\enum.py", line 476, in __new__
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 3392795225 is not a valid RuntimePlatform

If uncompressed before with UABE https://github.com/DerPopo/UABE
Unityextract.py can extract the assets just fine

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

OverflowError when unpacking file

I tried python unityextract --images (File Name)
but it returned

Traceback (most recent call last):
  File "unityextract", line 146, in <module>
    main()
  File "unityextract", line 143, in main
    exit(app.run())
  File "unityextract", line 56, in run
    self.handle_asset(asset)
  File "unityextract", line 81, in handle_asset
    for id, obj in asset.objects.items():
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\asset.py", line 83, in objects
    self.load()
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\asset.py", line 108, in load
    self.tree.load(buf)
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\type.py", line 132, in load
    tree.load(buf)
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\type.py", line 32, in load
    self.load_blob(buf)
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\type.py", line 54, in load_blob
    node_data = BytesIO(buf.read(24 * num_nodes))
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\utils.py", line 60, in read
    return self.buf.read(*args)
  File "%userprofile%\AppData\Local\Programs\Python\Python35-32\lib\site-packages\unitypack-0.6.1-py3.5.egg\unitypack\assetbundle.py", line 189, in read
    part = self.current_stream.read(size)
OverflowError: Python int too large to convert to C ssize_t

Actually it's not Hearthstone texture, but it's unity resource(UnityFS type, version 5.4.1f1).
Is this error caused by big file size? How can I fix this error and get unpacked file?

Crash when unpacking string

When trying use unity2yaml with the following file:
gd.data.zip

It goes on well, until some point it crashes on some object.
Reference trace:

Traceback (most recent call last):
  File "/home/theartist/.local/bin/unity2yaml", line 4, in <module>
    __import__('pkg_resources').run_script('unitypack==0.7.2', 'unity2yaml')
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 742, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1503, in run_script
    exec(code, namespace, namespace)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/EGG-INFO/scripts/unity2yaml", line 86, in <module>
    main()
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/EGG-INFO/scripts/unity2yaml", line 82, in main
    handle_asset(asset)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/EGG-INFO/scripts/unity2yaml", line 13, in handle_asset
    d = obj.read()
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 84, in read
    return self.read_value(self.type_tree, BinaryReader(BytesIO(object_buf)))
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 146, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 146, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 146, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 136, in read_value
    result.append(self.read_value(array_type, buf))
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 146, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/object.py", line 115, in read_value
    result = buf.read_string(size)
  File "/home/theartist/.local/lib/python3.6/site-packages/unitypack-0.7.2-py3.6.egg/unitypack/utils.py", line 70, in read_string
    ret = struct.unpack(self.endian + "%is" % (size), self.read(size))[0]
struct.error: unpack requires a bytes object of length 1684105299

Can't decode text

unityview.py

import unitypack

with open("specials.bundle") as f:
    bundle = unitypack.load(f)

    for id, object in asset.objects.items():
        # Let's say we only want TextAsset objects
        if object.type == "TextAsset":
            # We avoid reading the data, unless it's a TextAsset
            data = object.read()
            # The resulting `data` is a unitypack.engine.TextAsset instance
            print("Asset name:", data.name)
            print("Contents:", repr(data.script))
Traceback (most recent call last):
  File "D:\Users\Kim\Documents\test\bundles\unityview.py", line 4, in <module>
    bundle = unitypack.load(f)
  File "D:\Python\Python35\lib\site-packages\unitypack\__init__.py", line 11, in load
    return env.load(file)
  File "D:\Python\Python35\lib\site-packages\unitypack\environment.py", line 21, in load
    ret.load(file)
  File "D:\Python\Python35\lib\site-packages\unitypack\assetbundle.py", line 34, in load
    self.signature = buf.read_string()
  File "D:\Python\Python35\lib\site-packages\unitypack\utils.py", line 70, in read_string
    ret = self.read_cstring()
  File "D:\Python\Python35\lib\site-packages\unitypack\utils.py", line 83, in read_cstring
    c = self.read(1)
  File "D:\Python\Python35\lib\site-packages\unitypack\utils.py", line 60, in read
    return self.buf.read(*args)
  File "D:\Python\Python35\lib\codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 32: invalid continuation byte

sample files: https://puu.sh/sOXJZ/d2ac030dda.zip

Encoding problem with --text extract

D:\XML>python D:\unityUnpack\UnityPack-master\UnityPack-master\bin\unityextract
--text "C:\Program Files\Hearthstone\Data\Win\cardxml0.unity3d"
Traceback (most recent call last):
File "D:\unityUnpack\UnityPack-master\UnityPack-master\bin\unityextract", line
146, in
main()
File "D:\unityUnpack\UnityPack-master\UnityPack-master\bin\unityextract", line
143, in main
exit(app.run())
File "D:\unityUnpack\UnityPack-master\UnityPack-master\bin\unityextract", line
56, in run
self.handle_asset(asset)
File "D:\unityUnpack\UnityPack-master\UnityPack-master\bin\unityextract", line
118, in handle_asset
self.write_to_file(filename, d.script, mode=mode)
File "D:\unityUnpack\UnityPack-master\UnityPack-master\bin\unityextract", line
76, in write_to_file
written = f.write(contents)
File "C:\Python35\lib\encodings\cp1251.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\xed' in position 15
59: character maps to

How to deal with MonoBehavior items?

I'm using UnityPack to extract specific items from an .assets file. I can extract the content of a TextAsset item without any issue, but what about other types like MonoBehavior? I see they aren't available at all in the objects attribute of an Asset instance, are they completely ignored during the parsing process?

Also, the UnityPack readme states:

Not all base Unity3D classes are implemented. If a class is unimplemented, or a custom class (eg. a non-Unity class) is encountered, the resulting data is a dict of the fields instead. The same dict of fields can be found in the _obj attribute of the instance, otherwise.

Should this mean that the raw data of the MonoBehavior items should be available after all, even if UnityPack doesn't support this type of item?

Thank you in advance for your precision ๐Ÿ˜ƒ

Issue when trying to extract cardxml0.unity3d

No data is being passed to write_to_file function when obj.type is "TextAsset", resulting in txt files containing "w".
After passing d.script I get a traceback:

Traceback (most recent call last):
  File "/tools/python-unitypack-0.3/bin/unityextract", line 126, in <module>
    main()
  File "/tools/python-unitypack-0.3/bin/unityextract", line 123, in main
    exit(app.run())
  File "/tools/python-unitypack-0.3/bin/unityextract", line 54, in run
    self.handle_asset(asset)
  File "/tools/python-unitypack-0.3/bin/unityextract", line 106, in handle_asset
    self.write_to_file(filename, d.script, mode)
  File "/tools/python-unitypack-0.3/bin/unityextract", line 69, in write_to_file
    written = f.write(contents)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 572-573: ordinal not in range(128)

I'm running this on ubuntu 16.04 and python 3.5.1
d.script.encode("utf-8") with mode="wb" seems to work

Wrong shebang in current Wheel on PyPI

The current Wheel unitypack-0.7.1-py3-none-any.whl (MD5 70360240ba647c0353a0711f9cabb82e) on https://pypi.python.org/pypi/unitypack/0.7.1 uses #!/home/adys/.local/share/virtualenvs/hs/bin/python3 as shebang instead of the one used in the repository. This causes errors on UNIX-like systems (as Linux and macOS):

-bash: /usr/local/bin/unityextract: /home/adys/.local/share/virtualenvs/hs/bin/python3: bad interpreter: No such file or directory

Additionally I would also suggest to use #!/usr/bin/env python3 in the shebang (currently it is #!/usr/bin/env python).

Not work. Help me

import unitypack

with open("sounds11.unity3d", "rb") as f:
	bundle = unitypack.load(f)

	for asset in bundle.assets:
		print("%s: %s:: %i objects" % (bundle, asset, len(asset.objects)))
for id, object in asset.objects.items():
	# Let's say we only want TextAsset objects
	if object.type == "TextAsset":
		# We avoid reading the data, unless it's a TextAsset
		data = object.read()
		# The resulting `data` is a unitypack.engine.TextAsset instance
		print("Asset name:", data.name)
		print("Contents:", repr(data.script))

.

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 
=========== RESTART: C:\Users\Administrateur\Desktop\unitypack.py ===========
Traceback (most recent call last):
  File "C:\Users\Administrateur\Desktop\unitypack.py", line 1, in <module>
    import unitypack
  File "C:\Users\Administrateur\Desktop\unitypack.py", line 4, in <module>
    bundle = unitypack.load(f)
AttributeError: module 'unitypack' has no attribute 'load'
>>> 

AssertionError

Getting an AssertionError when attempting to run unityextract on an .assetbundle

py unityextract No_1.assetbundle

Traceback (most recent call last):
  File "unityextract", line 146, in <module>
    main()
  File "unityextract", line 143, in main
    exit(app.run())
  File "unityextract", line 53, in run
    bundle = unitypack.load(f)
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\__init__.py", line 11, in load
    return env.load(file)
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\environment.py", line 21, in load
    ret.load(file)
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack-0.6.1-py3.6.egg\unitypack\assetbundle.py", line 44, in load
    assert self.signature in (SIGNATURE_RAW, SIGNATURE_WEB), self.signature
AssertionError

Looking at the docs, it seems this utility only supports .Unity3D bundles. Are .assetbundle files not supported?

How do I get all names from AssetBundle?

Folks, how do I properly extract all asset lookup names from the specific bundle?

There is a simple example on how to read an asset from the bundle and get its name. However it's not the name which is used to look up a specific asset in the bundle.

Look up names, I believe, are stored somewhere in the header of the asset bundle. But it looks like AssetBundle class instance doesn't contain any lookup names.

Image decoding error

Noticed this error extracting the texture for card CFM_648, format problem maybe?

unityextract --images Hearthstone\Data\Win\cardtextures0.unity3d --filter HS9-007_M

Traceback (most recent call last):
  File ".\bin\unityextract", line 146, in <module>
    main()
  File ".\bin\unityextract", line 143, in main
    exit(app.run())
  File ".\bin\unityextract", line 56, in run
    self.handle_asset(asset)
  File ".\bin\unityextract", line 127, in handle_asset
    image = d.image
  File "python-unitypack\unitypack\engine\texture.py", line 175, in image
    return Image.frombytes(mode, size, data, codec, args)
  File "Python3.5.2\lib\site-packages\PIL\Image.py", line 2070, in frombytes
    im.frombytes(data, decoder_name, args)
  File "Python3.5.2\lib\site-packages\PIL\Image.py", line 744, in frombytes
    raise ValueError("not enough image data")
ValueError: not enough image data

Support for ETC_RGB4?

Traceback (most recent call last):
  File "/usr/local/bin/unityextract", line 146, in <module>
    main()
  File "/usr/local/bin/unityextract", line 143, in main
    exit(app.run())
  File "/usr/local/bin/unityextract", line 56, in run
    self.handle_asset(asset)
  File "/usr/local/bin/unityextract", line 127, in handle_asset
    image = d.image
  File "/usr/local/lib/python3.5/site-packages/unitypack/engine/texture.py", line 151, in image
    raise NotImplementedError("Unimplemented format %r" % (self.format))
NotImplementedError: Unimplemented format <TextureFormat.ETC_RGB4: 34>

OverflowError when unpacking UnityFS

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    bundle.assets[0].objects
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\asset.py", line 83, in objects
    self.load()
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\asset.py", line 108, in load
    self.tree.load(buf)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\type.py", line 132, in load
    tree.load(buf)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\type.py", line 32, in load
    self.load_blob(buf)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\type.py", line 54, in load_blob
    node_data = BytesIO(buf.read(24 * num_nodes))
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\utils.py", line 58, in read
    return self.buf.read(*args)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\assetbundle.py", line 189, in read
    part = self.current_stream.read(size)
OverflowError: Python int too large to convert to C ssize_t

Sorry to bother, but I've tried several UnityFS file and neither of them works.

Don't know why cannot upload zip file.
You can download it here .
https://www.sendspace.com/file/z1b0sm

pkg_resources.DistributionNotFound: 'unitypack'

When I try to run unityextract, I get a pkg_resources.DistributionNotFound error. I don't see any issues with imports in PyCharm, so I'm at a loss as to why this is occurring.

D:\dev\Python363\python.exe -m bin.unityextract "E:\SteamLibrary\Pillars of Eternity\PillarsOfEternity_Data\assetbundles\prefabs\objectbundle\gem_velune_125cp.unity3d"
Traceback (most recent call last):
  File "D:\dev\Python363\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "D:\dev\Python363\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\projects\UnityPack\bin\unityextract.py", line 7, in <module>
    import unitypack
  File "E:\projects\UnityPack\unitypack\__init__.py", line 6, in <module>
    __version__ = pkg_resources.require(r'unitypack')[0].version
  File "D:\dev\Python363\lib\site-packages\pkg_resources\__init__.py", line 984, in require
    needed = self.resolve(parse_requirements(requirements))
  File "D:\dev\Python363\lib\site-packages\pkg_resources\__init__.py", line 870, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'unitypack' distribution was not found and is required by the application

Am I doing wrong?

command:
unityextract --all -o . sharedassets0.assets

Traceback (most recent call last):
  File "/usr/local/bin/unityextract", line 146, in <module>
    main()
  File "/usr/local/bin/unityextract", line 143, in main
    exit(app.run())
  File "/usr/local/bin/unityextract", line 49, in run
    self.handle_asset(asset)
  File "/usr/local/bin/unityextract", line 127, in handle_asset
    image = d.image
  File "/usr/local/lib/python3.6/site-packages/unitypack/engine/texture.py", line 165, in image
    data = bytes(self.image_data)
  File "/usr/local/lib/python3.6/site-packages/unitypack/engine/texture.py", line 137, in image_data
    if self.stream_data:
  File "/usr/local/lib/python3.6/site-packages/unitypack/engine/object.py", line 6, in _inner
    ret = self._obj[f]
KeyError: 'm_StreamData'

When I install unityPack with './setup.py install', I got this :
command line :
unityextract --all -o . resources.assets

Traceback (most recent call last):
  File "/usr/local/bin/unityextract", line 4, in <module>
    __import__('pkg_resources').run_script('unitypack==0.6.1', 'unityextract')
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1494, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 146, in <module>
    main()
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 143, in main
    exit(app.run())
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 49, in run
    self.handle_asset(asset)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 85, in handle_asset
    d = obj.read()
  File "/usr/local/lib/python3.6/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 "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/unitypack/object.py", line 132, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/unitypack/object.py", line 100, in read_value
    size = buf.read_uint()
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/unitypack/utils.py", line 107, in read_uint
    return struct.unpack(self.endian + "I", self.read(4))[0]
struct.error: unpack requires a bytes object of length 4
bobtekiMacBook-Pro:UnityPack bobsmith$ unityextract --all -o . /Applications/Army\ Truck\ 2\ -\ Civil\ Uprising\ 3D.app/Contents/Resources/Data/sharedassets0.assets
Traceback (most recent call last):
  File "/usr/local/bin/unityextract", line 4, in <module>
    __import__('pkg_resources').run_script('unitypack==0.6.1', 'unityextract')
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1494, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 146, in <module>
    main()
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 143, in main
    exit(app.run())
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 49, in run
    self.handle_asset(asset)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/EGG-INFO/scripts/unityextract", line 85, in handle_asset
    d = obj.read()
  File "/usr/local/lib/python3.6/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 "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/unitypack/object.py", line 132, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/unitypack/object.py", line 101, in read_value
    result = buf.read_string(size)
  File "/usr/local/lib/python3.6/site-packages/unitypack-0.6.1-py3.6.egg/unitypack/utils.py", line 72, in read_string
    ret = struct.unpack(self.endian + "%is" % (size), self.read(size))[0]
struct.error: unpack requires a bytes object of length 976121446

How to use this?

Sorry for asking some stuipid questions.
I am not a programmer and this is my first time to use github.

I ued to extract unity3d files with Unity Studio but somehow it doesn't work with some files I got now.
So I googled new tool for extracting "UnityRaw" type data and I found Unitypack may be helpful.
But I don't know how to use it.
It looks like some kind of open codes. so where can I get the .exe?

If this kind of stupid issue may cause bad influence, just tell me and I will close/remove this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.