The archive command provides utilities for working with Unity Archives — container files used for AssetBundles and web platform .data files. Archives hold one or more files (typically SerializedFiles) and may apply compression to the content.
To inspect the serialized objects inside an archive, use the dump command, which can open archives directly without extracting first.
| Sub-Command | Description | Unity Archive | Web .data |
|---|---|---|---|
info |
Display a high-level summary | Yes | — |
header |
Display archive header information | Yes | — |
blocks |
Display the data block list | Yes | — |
list |
List contents of an archive | Yes | Yes |
extract |
Extract contents of an archive | Yes | Yes |
Displays a high-level summary of a Unity Archive file, including compression ratio, file counts, and data sizes.
UnityDataTool archive info <archive-path> [options]
| Option | Description | Default |
|---|---|---|
<archive-path> |
Path to the archive file | (required) |
-f, --format <Text|Json> |
Output format | Text |
UnityDataTool archive info scenes.bundle
UnityDataTool archive info scenes.bundle -f JsonDisplays the header information of a Unity Archive file, including format version, Unity version, file size, metadata compression, and archive flags.
Very old versions of the Unity Archive format are not supported. But the files created by all currently supported Unity versions should be compatible (and it was tested with files as old as Unity 2017).
UnityDataTool archive header <archive-path> [options]
| Option | Description | Default |
|---|---|---|
<archive-path> |
Path to the archive file | (required) |
-f, --format <Text|Json> |
Output format | Text |
UnityDataTool archive header scenes.bundle
UnityDataTool archive header scenes.bundle -f JsonDisplays the data block list of a Unity Archive file, showing the size, compression type, and file offset of each block.
Very old versions of the Unity Archive format are not supported.
UnityDataTool archive blocks <archive-path> [options]
| Option | Description | Default |
|---|---|---|
<archive-path> |
Path to the archive file | (required) |
-f, --format <Text|Json> |
Output format | Text |
UnityDataTool archive blocks scenes.bundle
UnityDataTool archive blocks scenes.bundle -f JsonLists the contents of an archive, including the offset, size, and flags of each file.
Very old versions of the Unity Archive format are not supported.
UnityDataTool archive list <archive-path> [options]
| Option | Description | Default |
|---|---|---|
<archive-path> |
Path to the archive file | (required) |
-f, --format <Text|Json> |
Output format | Text |
UnityDataTool archive list scenes.bundle
UnityDataTool archive list scenes.bundle -f JsonExtracts the contents of an archive to disk. This is similar to Unity's WebExtract tool.
UnityDataTool archive extract <archive-path> [options]
| Option | Description | Default |
|---|---|---|
<archive-path> |
Path to the archive file | (required) |
-o, --output-path <path> |
Output directory | archive |
--filter <text> |
Case-insensitive substring filter on file paths inside the archive | (none — extract all) |
UnityDataTool archive extract scenes.bundle -o contents
UnityDataTool archive extract scenes.bundle --filter sharedAssetsOutput files:
contents/BuildPlayer-SampleScene.sharedAssets
contents/BuildPlayer-SampleScene
contents/BuildPlayer-Scene2.sharedAssets
contents/BuildPlayer-Scene2
Note: The extracted files are in binary formats, not text. If they are SerializedFiles then use the
dumpcommand to convert them to readable text format. See also theserialized-filecommand.
The archive command works at the container level — it shows the archive structure and can extract the raw files. To inspect the serialized objects inside those files, use the dump command, which can open an archive directly and dump all SerializedFiles inside it without extracting first.
| Command | Output | Use Case |
|---|---|---|
archive extract |
Raw binary files (SerializedFiles, .resS, .resource, etc.) | When you need the individual files on disk |
dump |
Human-readable text representation of serialized objects | When you want to inspect object properties and values inside an archive |