The archive command provides utilities for working with Unity Archives (AssetBundles and web platform .data files).
| Sub-Command | Description |
|---|---|
info |
Display a high-level summary |
header |
Display archive header information |
blocks |
Display the data block list |
list |
List contents of an archive |
extract |
Extract contents of an archive |
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.
| Command | Output | Use Case |
|---|---|---|
archive extract |
Binary SerializedFiles, .resS anything else inside the archive content | When you need all the raw files inside an archive |
dump |
text | When you want to inspect object content |
The dump command can directly process archives without extracting first.