This document was translated from Korean to English with the help of ChatGPT.
If you find any mistranslations or unclear expressions, please feel free to open an issue.
UWDTool
A tool for extracting, packing, or inspecting the contents of data files used in Unity WebGL games, including assets and other related resources.
Supports processing of *.unityweb files used in Unity 2019 and earlier versions.
What Is UnityWebData
A UnityWebData file is a file that is loaded and used in conjunction with a WebAssembly file in a WebGL game, primarily a file that combines all of the asset, resource, and metadata files.
Installation and Usage
Installation
pip install uwdtool
CLI
uwdtool [-h] [-p | -u | -isp] [-i ARG_INPUT] [-o ARG_OUTPUT] [-c {brotli,gzip,none}]
-
-h,--help: Displays help and information about the program. -
-p,--pack: Packs the files in the specified input directory into a UnityWebData file and saves it to the output path.
The input should be the path to the folder containing the files to pack. -
-u,--unpack: Unpacks the specified UnityWebData file and saves the extracted files to the output directory.
The input should be the path to the file to unpack, and the output should be the target folder for the extracted files. -
-isp,--inspect: Displays information about the contents of a UnityWebData file, including file names and sizes.
Only the input file is required; the output path is not needed. -
-c: Specifies the compression format.
Available options arebrotli,gzip, ornone.
If omitted, the format is automatically detected.
What is a UnityWebData File?
A UnityWebData file is a bundled resource file used in Unity WebGL games, loaded alongside the WASM file. It typically contains assets, resources, and metadata packed into a single file.
In Unity versions 5.0 through 2019, these files used the .unityweb extension. Starting with later versions, the extension changed to .data. Unity supports compression formats like gzip and Brotli during the build process. Since 2019, the file extension itself (e.g., .data.gz or .data.br) indicates the compression format, making it easy to determine how to decompress it. However, in earlier versions, the .unityweb extension was used regardless of compression type, so the engine had to rely on markers inside the file to determine whether and how the data was compressed.
Importantly, once decompressed, the internal structure of a UnityWebData file is consistent regardless of its compression status.
UnityWebData Structure
Header
| Name | Size (bytes) | Type | Description |
|---|---|---|---|
| Signature | 16 | string | Fixed string: "UnityWebData1.0\0" |
| File Table Offset | 4 | uint32 | Offset to the start of the file data section (same as the first file's offset) |
File Info Header
The following structure is repeated for each file, up until the file data section begins:
| Name | Size (bytes) | Type | Description |
|---|---|---|---|
| File Offset | 4 | uint32 | Offset to the start of the file |
| File Size | 4 | uint32 | Size of the file in bytes |
| Filename Length | 4 | uint32 | Length of the file name (n) |
| Filename | n | string | Name of the file |
File Data Section
After the headers, all the actual file contents are stored sequentially.
To read a specific file, locate its offset and size from the header, then read the corresponding byte range from the data section.
Binary Template for 010 Editor
https://gist.github.com/akio7624/908497ef15a84a436fae9ab5439aa01f
This is a custom binary template for UnityWebData files, designed for use with 010 Editor's binary template system. It provides a visual representation of the internal structure, making it easier to analyze and understand the contents of a UnityWebData file.
If the data file is compressed, you must decompress it before analysis.
Metadata
Release files for uwdtool 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uwdtool-1.4.1.tar.gz | 8.0 kB | Without provenance | Details for uwdtool-1.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uwdtool-1.4.1-py3-none-any.whl | Python 3 | none | any | Details for uwdtool-1.4.1-py3-none-any.whl |
Total release size: 19.3 kB
Release files / uwdtool-1.4.1.tar.gz
| Download URL | uwdtool-1.4.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99867222bdbcfdba8dee49d47f13181a499b4e4d44d92289b6b79c752ff1d6ce
|
|
BLAKE2b-256 checksum How to use checksums |
538d257ec1ceb3388cbb86bf7a4ebd0ce29ec92818d15526267fcb25a11a010d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2
|
Release files / uwdtool-1.4.1-py3-none-any.whl
| Download URL | uwdtool-1.4.1-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4c64caca90d3612946f2b642e122db4b181d0401ddb9295d7a8b896180203a6
|
|
BLAKE2b-256 checksum How to use checksums |
8eea67438bb781ccd9530c808ad0473679b434338b1260a38960b9208d43b10b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2
|
Security for uwdtool 1.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.