Project Category: Individual Project (Personal Productivity Tool)
I built a command-line tool that automates texture extraction from Unity game files. My implementation uses UnityPy to parse proprietary Unity asset bundles, identifies Texture2D and Sprite objects, and converts them to standard PNG format. The tool supports batch processing with recursive directory scanning and maintains organized output structures.
A Python library that reverse-engineers Unity's proprietary asset bundle format (UnityFS). UnityPy reads the binary file structure, parses object type definitions, and extracts asset data without requiring Unity Editor. It handles various Unity versions (5.x - 2022.x) and supports multiple asset types including textures, sprites, audio, and meshes. For this project, I specifically target Texture2D and Sprite objects.
Python Imaging Library (Pillow) handles the image format conversion. UnityPy extracts raw pixel data from Unity's internal texture format, then Pillow converts it to standard PNG with proper color channels (RGB/RGBA). It also handles image metadata like dimensions and compression.
I engineered a recursive directory scanner with the -r flag that traverses folder hierarchies, identifies Unity bundle files by signature detection, and maintains source-to-output directory mapping. This allows processing entire game folders (500+ files) in one command while preserving the original file organization.
Accepts Unity3D file or directory path. With -r flag, recursively scans for .unity3d, .bundle, .assets files
Validates file header for UnityFS magic bytes (0x55 0x6E 0x69 0x74 0x79 0x46 0x53). Skips non-Unity files automatically
UnityPy decompresses bundle data (LZ4/LZMA), parses type tree, and loads object containers
Iterates through all objects, filters for Texture2D and Sprite types, extracts image data and metadata (dimensions, format)
Pillow converts raw pixel data to PNG format with proper color channels. Maintains transparency (RGBA) for sprites
Saves to extracted_images/ directory with structure mirroring source. Example: source/characters/hero.unity3d → extracted_images/characters/hero_texture1.png
My code automatically identifies Unity bundle files by signature, not extension - handles renamed or obfuscated files
I built the -r flag to traverse entire game folders, processing 500+ files while maintaining source organization
My -o parameter allows flexible output destinations, useful for batch processing multiple games to separate folders
I designed the interface for scripting - no interactive prompts, clean exit codes, perfect for batch files or automated workflows
py unity_image_extractor.py "path\to\file.unity3d"
py unity_image_extractor.py "path\to\game_directory" -r
py unity_image_extractor.py "source" -o "custom_output_dir" -r
Images are saved to Unity_Image_Extractor/extracted_images/, organized by source file structure:
extracted_images/
├── characters/
│ ├── hero_texture_001.png
│ ├── hero_texture_002.png
│ └── enemy_sprite_001.png
├── ui/
│ ├── button_normal.png
│ └── icon_health.png
└── environment/
└── background_001.png
pip install UnityPypip install Pillowpip install UnityPy Pillow
Important Disclaimer: This tool is intended for educational and personal research purposes only. All extracted assets are the intellectual property of their respective creators and copyright holders.
Do NOT:
• Use extracted assets for commercial purposes
• Redistribute assets without permission
• Violate copyright or EULA agreements
Recommended Use: Personal learning, asset analysis, modding with developer permission, educational research.