A powerful, user-friendly command-line tool to extract and repack Unity asset bundles. Built with Python and UnityPy.
Developer: minhmc2007
Install the tool directly from PyPI:
pip install unity-bundle-toolOnce installed, you can use the ubt command from your terminal.
ubt extract path/to/your/asset.bundle path/to/output_folder/This will create:
output_folder/
├── manifest.json # Asset tracking manifest
├── Textures/ # PNG files from Texture2D/Sprite assets
├── TextAssets/ # TXT/bytes files from TextAsset objects
├── MonoBehaviours_JSON/ # JSON files from MonoBehaviour typetrees
├── MonoBehaviours_DAT/ # Raw binary data from MonoBehaviours
├── AudioClips/ # WAV or raw audio files
└── OtherAssets/ # Generic binary data from other asset types
After modifying files, repack them into a new bundle:
ubt repack path/to/output_folder/ path/to/new_repacked.bundleImportant: The input directory must contain the manifest.json file created during extraction. The original bundle file referenced in the manifest must still exist and be accessible.
- Extract Unity bundle files to organized directory structure
- Support for multiple asset types:
- Textures (Texture2D, Sprite) → PNG files
- Text Assets → TXT/bytes files
- MonoBehaviours → JSON (typetree) or DAT (raw binary)
- Audio Clips → WAV or raw audio data
- Generic Assets → Raw binary data
- Repack modified assets back into Unity bundle format
- Automatic file sanitization and organization
- Detailed manifest tracking for reliable repacking
| Asset Type | Extraction Format | Repacking Support |
|---|---|---|
| Texture2D/Sprite | PNG | ✅ Yes |
| TextAsset | TXT/bytes | ✅ Yes |
| MonoBehaviour (with typetree) | JSON | ✅ Yes |
| MonoBehaviour (raw) | DAT binary | |
| AudioClip | WAV/raw audio | |
| Other types | Raw binary |
- Extract a bundle to examine and modify assets
- Modify the extracted files as needed:
- Edit PNG images in image editors
- Modify text files
- Edit JSON files for MonoBehaviour data
- Repack the modified assets into a new bundle
- Keep the original bundle file: Repacking requires the original bundle as a template
- Preserve file structure: Don't move files between the organized subdirectories
- Manifest dependency: The
manifest.jsonfile is essential for repacking - Binary compatibility: Some asset modifications may not work depending on Unity version and asset complexity
- Backup your files: Always keep backups of original bundles before modification
The script includes comprehensive error handling for:
- Corrupted or protected bundle files
- Missing dependencies
- Invalid file paths
- Asset processing failures
- Repacking inconsistencies
- MonoBehaviour repacking from raw DAT files has limited reliability
- AudioClip repacking may not preserve original compression formats
- Some Unity-specific asset formats may not be fully supported
- Protected or encrypted bundles cannot be processed
ubt --help
ubt extract --help
ubt repack --helpThis project is licensed under the GPL 3 License.