Included in every Unity Editor installation are the low-level command-line tools WebExtract and binary2text, which you can use to inspect the contents of built Unity data. Use these tools to extract files embedded within a Unity archive, such as AssetBundles, or build outputs.
data.unity3d file from a compressed Player build.StreamingAssets/ContentArchives folder for Entities builds.SerializedFile (Unity’s serialized asset format). This allows you to inspect object data, references, and type information. However, this tool only contains useful information for files that contain TypeTrees. By default, Player data doesn’t contain TypeTrees. Examples of binary files you can open with this tool include the following:
Library/LastBuild.buildreport).Library/Artifacts folder, which you can inspect to understand the result of an import process.level and sharedasset files.A SerializedFile is Unity’s serialized asset data format. It exists as either text, or binary format. You can use the Asset Serialization Mode Project Setting to define whether Unity serializes assets in binary, text, or mixed mode (which uses the format that an asset was previously saved in, resulting in a mix of binary and text files).
The binary format is used for imported artifacts in Library/Artifacts, Player build outputs, AssetBundles, and other build archives. The binary2text tool can inspect this binary format.
WebExtract and binary2text are installed in the following locations:
| Platform | Install path |
|---|---|
| Windows | C:\Program Files\Unity\Editor\Data\Tools |
| macOS | /Applications/Unity/Unity.app/Contents/Tools |
To extract an archive file to binary format use the WebExtract tool:
Tools folder that contains WebExtract.WebExtract <FilePathOfArchiveFile>, or ./WebExtract <FilePathOfArchiveFile> if using macOS or Linux.The tool then creates a folder that contains the binary data of the archive file.
To create a text representation of a binary file, use the binary2text tool:
Tools folder that contains binary2text.binary2text <FilePathOfBinaryFile>, or ./binary2text <FilePathOfBinaryFile> if using macOS or Linux.The tool then creates a .txt file in the same folder as the binary file.
Note: The tool has backwards compatibility, so newer versions of Unity can read files created with older versions of Unity, but older versions of Unity might not be able to read files created with newer versions.
The binary2text tool has the following optional arguments you can pass when you run it:
| Argument | Description |
|---|---|
<outputTextFile> |
Specifies a file to write the output to. If left blank, binary2text writes the output to <BinaryFileName>.txt. |
-typeinfo |
Includes the TypeTree information from the SerializedFile header. This includes Unity types, MonoBehaviour-based C# classes, and [SerializeReference] types, which is useful for debugging code stripping, missing types, or serialization mismatches between Unity versions. |
-largebinaryhashonly |
Summarizes the content with a hash instead of printing each byte. |
-hexfloat |
Prints floating point numbers as hexadecimal. This is more accurate than the default decimal display. |
-detailed |
Provides detailed output for certain data structures. |
UnityDataTools is a newer alternative to WebExtract and Binary2Text. It contains the following features:
dump option: Opens an AssetBundle and produces text dumps of each SerializedFile it contains directly in the current working folder, without requiring a full binary extraction first. This behavior is similar to binary2text.analyze option: Populates an SQLite database with detailed information about the AssetBundle’s contents. This is faster than binary2text and can handle large object and asset counts that UI tools might struggle with.For more information, refer to the UnityDataTools repository.