analyze Command
June 12, 2026 · View on GitHub
The analyze command extracts information from Unity Archives (e.g. AssetBundles) and SerializedFiles and dumps the results into a SQLite database.
Quick Reference
UnityDataTool analyze <path> [options]
| Option | Description | Default |
|---|---|---|
<path> | Path to folder containing files to analyze | (required) |
-o, --output-file <file> | Output database filename | database.db |
-p, --search-pattern <pattern> | File search pattern (* and ? supported) | * |
-s, --skip-references | Do not extract references (smaller DB, no refs table). CRC is still computed. | false |
--skip-crc | Skip the CRC32 checksum calculation (faster; objects.crc32 will be 0) | false |
-v, --verbose | Show more information during analysis | false |
--no-recurse | Do not recurse into sub-directories | false |
-d, --typetree-data <file> | Load an external TypeTree data file before processing (Unity 6.5+) | — |
Examples
Analyze all files in a directory:
UnityDataTool analyze /path/to/asset/bundles
Analyze only .bundle files and specify a custom database name:
UnityDataTool analyze /path/to/asset/bundles -o my_database.db -p "*.bundle"
Fastest analysis (skip both reference extraction and CRC):
UnityDataTool analyze /path/to/bundles --skip-references --skip-crc
See also Analyze Examples.
What Can Be Analyzed
The analyze command works with the following types of directories:
| Input Type | Description |
|---|---|
| AssetBundle build output | The output path of an AssetBundle build |
| Addressables folder | StreamingAssets/aa folder from a Player build, including BuildLayout files |
| Entities content | StreamingAssets/ContentArchives folder for Entities projects |
| Player Data folder | The Data folder of a Unity Player build |
| Compressed Player builds | The data.unity3d file will be analyzed like AssetBundles |
| BuildReport files | The build report is typically found at a path like Library/LastBuild.buildreportand is a binary serialized file |
| AssetDatabase Artifacts | The tool will work to some extent with serialized files created in the AssetDatabase artifact storage, inside the Library folder |
Note: Some platforms require extracting content from platform-specific containers first (e.g.,
.apkfiles on Android).
Output Database
The analysis creates a SQLite database that can be explored using tools like DB Browser for SQLite or the command line sqlite3 tool.
Refer to the Analyzer documentation for the database schema reference and information about extending this command.
Troubleshooting
File Loading Warnings
Failed to load 'C:\....\MyData.db'. File may be corrupted or was serialized with a newer version of Unity.
These warnings occur when the tool encounters non-Unity files in the analyzed directory. They are usually harmless—the analyze process continues and produces a valid database.
Solutions:
- Use
-p "*.bundle"to filter by file extension - Use
--no-recurseto limit directory depth - Use
-v(verbose) to see which files are ignored
The tool automatically ignores common non-Unity file types (.txt, .json, .manifest, etc.).
TypeTree Errors
Error processing file: C:\...\TestProject_Data\level0
System.ArgumentException: Invalid object id.
This error occurs when SerializedFiles are built without TypeTrees. The command will skip these files and continue.
Solutions:
- Enable ForceAlwaysWriteTypeTrees in your Unity build settings. See Unity Content Format for details.
- If your bundles were built with external TypeTree data (Unity 6.5+), use the
--typetree-dataoption to load the TypeTree data file before analysis:
UnityDataTool analyze /path/to/bundles --typetree-data /path/to/typetree.bin
SQL Constraint Errors
SQLite Error 19: 'UNIQUE constraint failed: objects.id'
or
SQLite Error 19: 'UNIQUE constraint failed: serialized_files.id'.
These errors occur when the same serialized file name appears in multiple sources:
| Cause | Solution |
|---|---|
| Multiple builds in same directory | Analyze each build separately |
| Scenes with same filename (different paths) | Rename scenes to be unique |
| AssetBundle variants | Analyze variants separately |
See Comparing Builds for strategies to compare different versions of builds.
Slow Analyze times, large output database
Two independent flags reduce analyze time and database size:
--skip-crcskips the CRC32 calculation. This is usually the largest time saver, because computing a CRC requires reading the full content of every object, including large texture, mesh and audio data in companion.resS/.resourcefiles.--skip-referencesskips reference extraction, which is the largest contributor to database size (therefstable). The references are not needed for core asset inventory and size information.
For the fastest, smallest result, combine them.
A real life analyze of a big Addressables build, skipping both references and CRC, shows how large a difference this can make:
- 208 seconds and produced a 500MB database (default)
- 9 seconds and produced a 68 MB file (with
--skip-references --skip-crc)
When --skip-references is used, some functionality is lost:
- the
find-refscommand will not work view_material_shader_refsandview_material_texture_refswill be emptyscript_object_viewwill be empty- Queries that look at the relationship between objects will not work. For example the refs table is required to link between a
MonoBehaviourand itsMonoScript.
When --skip-crc is used, the objects.crc32 column will be 0 for all objects. This means:
- No detection of identical objects by content hash (See Comparing Builds)
- The
view_potential_duplicatesview relies partially on CRC32 to distinguish true duplicates