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]
OptionDescriptionDefault
<path>Path to folder containing files to analyze(required)
-o, --output-file <file>Output database filenamedatabase.db
-p, --search-pattern <pattern>File search pattern (* and ? supported)*
-s, --skip-referencesDo not extract references (smaller DB, no refs table). CRC is still computed.false
--skip-crcSkip the CRC32 checksum calculation (faster; objects.crc32 will be 0)false
-v, --verboseShow more information during analysisfalse
--no-recurseDo not recurse into sub-directoriesfalse
-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 TypeDescription
AssetBundle build outputThe output path of an AssetBundle build
Addressables folderStreamingAssets/aa folder from a Player build, including BuildLayout files
Entities contentStreamingAssets/ContentArchives folder for Entities projects
Player Data folderThe Data folder of a Unity Player build
Compressed Player buildsThe data.unity3d file will be analyzed like AssetBundles
BuildReport filesThe build report is typically found at a path like Library/LastBuild.buildreportand is a binary serialized file
AssetDatabase ArtifactsThe 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., .apk files 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-recurse to 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-data option 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:

CauseSolution
Multiple builds in same directoryAnalyze each build separately
Scenes with same filename (different paths)Rename scenes to be unique
AssetBundle variantsAnalyze 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-crc skips 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/.resource files.
  • --skip-references skips reference extraction, which is the largest contributor to database size (the refs table). 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-refs command will not work
  • view_material_shader_refs and view_material_texture_refs will be empty
  • script_object_view will be empty
  • Queries that look at the relationship between objects will not work. For example the refs table is required to link between a MonoBehaviour and its MonoScript.

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_duplicates view relies partially on CRC32 to distinguish true duplicates