faelenor / asset-bundle-analyzer Goto Github PK
View Code? Open in Web Editor NEWThis tool extracts useful information from Unity asset bundles and stores the information in an SQLite database.
License: GNU General Public License v3.0
This tool extracts useful information from Unity asset bundles and stores the information in an SQLite database.
License: GNU General Public License v3.0
When running the latest version on macOS 10.14 I'm getting this error:
-> python3 analyzer.py /Applications/Unity/Hub/Editor/2019.3.0f6/Unity.app/Contents/Tools ~/work/sizes/validation1-bundles/ Traceback (most recent call last): File "analyzer.py", line 1450, in <module> main() File "analyzer.py", line 52, in main run_tool_with_timeout("WebExtract", filepath, ret_code, 60, 0) File "analyzer.py", line 1416, in run_tool_with_timeout p = Process(run_tool(tool, filepath, ret_code, level)) File "analyzer.py", line 1432, in run_tool path = os.path.join(args.tool_path, tool) NameError: name 'args' is not defined
This happens with both python 2 and 3.
When I roll back to the previous commit on github everything works as expected on python 2. I think something might've gone wrong in the python 3 conversion.
Hi.
I used this tool and it is very useful.
When I analyze the asset bundle, it displays Warning: unhandled type Type*!
.
What is Type*
?
Thanks.
always ,i use unity in windows to pack the assets into a assetBundle,
but, i cann't understand why the unity tool folder is needed in this project?
what should it be in windows PC?
Unity Version: 2019.3.8.f1 (Win64)
Analyzer Version: master (49396c2)
Addressables Version: 1.7.5
SBP Version: 1.5.10
Python: 3.8.2 (Win64)
I've ran the analyzer over our set of asset bundles which are generated by Addressables and at least one bundle could not be parsed properly:
Traceback (most recent call last):
File ".\analyzer.py", line 1450, in <module>
main()
File ".\analyzer.py", line 78, in main
objs = p.parse(datafile + ".txt")
File ".\analyzer.py", line 145, in parse
data = f.read()
File "[..]\Python38\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 21026952: character maps to <undefined>
Beforehand, some warnings about a unhandled type were printed.
Maybe the converted bundle files should be handled as UTF-8?
The analyzer just exits when it reaches this error. Maybe it should continue parsing the rest of the bundles, only printing a warning/error for this bundle?
Tried to run this on a unity build bundles folder and got this error:
$ /c/Python310/python analyzer.py "C:\Program Files\Unity\Hub\Editor\2020.3.2f1\Editor\Data\Tools" "C:\Users\rhysv\Projects\negative-nancy\Builds\37\Release\Development\win\Negative Nancy_Data\StreamingAssets\aa\StandaloneWindows64"
Processing base_assets_all_a36237102129d9c766d799f6f2097327.bundle
Parsing CAB-74520165df6dfd55c6ebe63122330149
Error in -2967533875104892482
ParsedField(level=3, name='buttons', value=None, type='Button')
ParsedField(level=4, name='size', value='0', type='int')
ParsedField(level=2, name='variants', value=None, type='Platform_DirectInput_Base')
ParsedField(level=3, name='size', value='0', type='int')
ParsedField(level=1, name='rawInput', value=None, type='Platform_RawInput')
ParsedField(level=2, name='description', value='""', type='string')
ParsedField(level=2, name='matchingCriteria', value=None, type='MatchingCriteria')
ParsedField(level=3, name='axisCount', value='3', type='int')
ParsedField(level=3, name='buttonCount', value='0', type='int')
ParsedField(level=3, name='disabled', value='0', type='UInt8')
ParsedField(level=3, name='tag', value='""', type='string')
ParsedField(level=3, name='hatCount', value='0', type='int')
ParsedField(level=3, name='alternateElementCounts', value=None, type='ElementCount')
ParsedField(level=4, name='size', value='0', type='int')
ParsedField(level=3, name='productName_useRegex', value='0', type='UInt8')
ParsedField(level=3, name='productName', value=None, type='vector')
ParsedField(level=4, name='size', value='3', type='int')
ParsedField(level=4, name='data', value='"Saitek Pro Flight Rudder Pedals"', type='string')
ParsedField(level=4, name='data', value='"Saitek Pro Flight Combat Rudder Pedals"', type='string')
ParsedField(level=3, name='productGUID', value=None, type='vector')
* ParsedField(level=4, name='size', value='3', type='int')
ParsedField(level=4, name='data', value='"076306a3"', type='string')
ParsedField(level=4, name='data', value='"076406a3"', type='string')
ParsedField(level=4, name='data', value='"076506a3"', type='string')
ParsedField(level=3, name='productId', value=None, type='vector')
ParsedField(level=4, name='size', value='1', type='int')
ParsedField(level=4, name='<vector data>', value='1891', type='int')
ParsedField(level=3, name='deviceType', value='20', type='int')
ParsedField(level=2, name='elements', value=None, type='Elements')
ParsedField(level=3, name='axes', value=None, type='Axis')
ParsedField(level=4, name='size', value='3', type='int')
ParsedField(level=4, name='data', value=None, type='Axis')
ParsedField(level=5, name='customCalculation', value=None, type='PPtr<$CustomCalculation>')
ParsedField(level=6, name='m_FileID', value='0', type='int')
ParsedField(level=6, name='m_PathID', value='0', type='SInt64')
ParsedField(level=5, name='customCalculationSourceData', value=None, type='CustomCalculationSourceData')
ParsedField(level=6, name='size', value='0', type='int')
ParsedField(level=5, name='elementIdentifier', value='0', type='int')
ParsedField(level=5, name='sourceType', value='1', type='int')
ParsedField(level=5, name='sourceAxis', value='1', type='int')
Traceback (most recent call last):
File "C:\Users\rhysv\Projects\asset-bundle-analyzer\analyzer.py", line 1452, in <module>
main()
File "C:\Users\rhysv\Projects\asset-bundle-analyzer\analyzer.py", line 79, in main
objs = p.parse(datafile + ".txt")
File "C:\Users\rhysv\Projects\asset-bundle-analyzer\analyzer.py", line 158, in parse
objects[int(match[0])] = {"ClassID": int(match[1]), "Type": match[2], "Content": self._parse_obj()}
File "C:\Users\rhysv\Projects\asset-bundle-analyzer\analyzer.py", line 297, in _parse_obj
obj[field_name] = Field(field.type, self._parse_obj(level+1))
File "C:\Users\rhysv\Projects\asset-bundle-analyzer\analyzer.py", line 297, in _parse_obj
obj[field_name] = Field(field.type, self._parse_obj(level+1))
File "C:\Users\rhysv\Projects\asset-bundle-analyzer\analyzer.py", line 198, in _parse_obj
raise Exception("Indentation error!")
Exception: Indentation error!
Hi. Python 2.7 will be no longer supported in 2020. Is there any plan to support Python 3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.