Analyze built assets
Use the WebExtract and binary2text tools to convert and view asset archive files.
読み終わるまでの所要時間 4 分最終更新 22日前
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.
-
WebExtract: Extracts the files in a Unity archive file to a binary format. Places the binary file in a folder named after the source file. You can use this tool to extract data such as the following:
- AssetBundles including Addressables build output.
- The file from a compressed Player build.
data.unity3d - Files inside the folder for Entities builds.
StreamingAssets/ContentArchives
-
binary2text: Creates a text representation of a binary(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:
SerializedFile- Serialized files inside archives that have been extracted using WebExtract.
- BuildReport files (for example ).
Library/LastBuild.buildreport - Player data files including and
levelfiles.sharedasset - Files from the Produced Files / Artifacts section of the Import Activity window.
SerializedFile format
A 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).
SerializedFileThe binary format is used for imported artifacts in , Player build outputs, AssetBundles, and other build archives. The binary2text tool can inspect this binary format.
Library/ArtifactsUse WebExtract and binary2text
WebExtract and binary2text are installed in the following locations:
Platform | Install path |
|---|---|
| Windows | |
| macOS | |
Extract archive files
To extract an archive file to binary format use the tool:
WebExtract- Go to the folder that contains
Tools.WebExtract - Run the command , or
WebExtract <FilePathOfArchiveFile>if using macOS or Linux../WebExtract <FilePathOfArchiveFile>
The tool then creates a folder that contains the binary data of the archive file.
Create a text representation of a binary file
To create a text representation of a binary file, use the tool:
binary2text- Go to the folder that contains
Tools.binary2text - Run the command , or
binary2text <FilePathOfBinaryFile>if using macOS or Linux../binary2text <FilePathOfBinaryFile>
The tool then creates a file in the same folder as the binary file.
.txtThe binary2text tool has the following optional arguments you can pass when you run it:
Argument | Description |
|---|---|
| Specifies a file to write the output to. If left blank, binary2text writes the output to |
| Includes the TypeTree information from the |
| Summarizes the content with a hash instead of printing each byte. |
| Prints floating point numbers as hexadecimal. This is more accurate than the default decimal display. |
| Provides detailed output for certain data structures. |
UnityDataTools
UnityDataTools is a newer alternative to and . It contains the following features:
WebExtractBinary2Text- option: Opens an AssetBundle and produces text dumps of each
dumpit contains directly in the current working folder, without requiring a full binary extraction first. This behavior is similar toSerializedFile.binary2text - option: Populates an SQLite database with detailed information about the AssetBundle's contents. This is faster than
analyzeand can handle large object and asset counts that UI tools might struggle with.binary2text
For more information, refer to the UnityDataTools repository.