skillfed

UnityPy

A Unity extraction and patching package

unitypy v1.25.3 210.2K downloads/30d#9,503 on PyPI1,397
Permissive license MIT License Copyright (c) 2019-2026 K0lb3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) Active released

What it is and what it does

UnityPy is a Python library that reads and writes Unity game assets—textures, sprites, meshes, and other serialized objects—extracted from game bundles, APK files, and asset containers. It parses the native typetree structure that Unity uses internally, allowing you to inspect and modify assets in their original form rather than as opaque binary blobs. The library can load assets from file paths, folders, byte streams, or raw bytes, automatically detecting whether the input is a WebFile, BundleFile, Asset, or APK.

The package has 10 runtime dependencies, including compiled C extensions for compression (brotli, lz4) and texture decoding (texture2ddecoder, etcpak, astc-encoder-py). On Windows, Visual C++ Redistributable is required. The C-based typetree reader can crash Python without warning in some cases; a Python fallback exists but must be enabled manually. The library is actively maintained and supports Python 3.8 and newer, with precompiled wheels for most platforms and Python versions.

Use it for:

  • Extract textures and sprites from game asset bundles for analysis or archival.
  • Modify game assets (rename objects, change texture data) and save edited bundles back to disk.
  • Automate bulk extraction of specific object types (meshes, audio, configuration files) from game files.
  • Inspect the structure and metadata of Unity serialized assets for reverse-engineering or data-mining projects.
  • Parse APK files from mobile games to access embedded Unity assets.
  • Patch game assets programmatically by parsing as dict or class, modifying fields, and writing back.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

UnityPy extracts and edits Unity asset files (textures, sprites, meshes, and other object types) from game bundles, APK files, and serialized assets, supporting both read and write operations via native typetree structures.

Yes, if you need to extract or edit Unity game assets. The library is actively maintained with recent releases and has no known security vulnerabilities. Install friction is moderate due to compiled dependencies and a potential C-typetree crash risk, but precompiled wheels and a fallback mode mitigate these. MIT license is permissive for both open and commercial use. Pin the version if you cannot tolerate breaking changes between minor releases.

Install

unitypy on PyPI

pip

pip install unitypy

uv

uv add unitypy

poetry

poetry add unitypy

Installing UnityPy

Before you install

Medium install friction: 10 runtime dependencies including compiled C extensions (brotli, lz4, texture2ddecoder, etcpak, astc-encoder-py). On Windows, Visual C++ Redistributable is required. The C-typetree reader can crash Python without warning; a fallback mode exists but must be manually enabled. Active maintenance with recent releases.

License in practice

MIT License (permissive): you can use, modify, and distribute UnityPy freely in commercial and private projects, but must include the license notice. The author requests sponsorship or charitable donation for commercial use.

Quickstart

import UnityPy

env = UnityPy.load('path/to/asset_file')
for obj in env.objects:
    if obj.type.name == 'Texture2D':
        data = obj.parse_as_object()
        img = data.image
        img.save('output.png')

Visual C++ Redistributable required on Windows; C-typetree reader may crash Python without warning (disable via configuration if needed).

Verify before relying

  • Whether the C-typetree crash occurs in typical workflows or only edge cases.
  • Performance characteristics when processing large asset bundles or many objects.
  • Compatibility with all Unity versions and asset formats beyond the documented examples.
  • Whether breaking changes between minor versions (x.y) are frequent enough to require version pinning in production.
  • Actual download volume and user base size to assess community support.

Package facts

License MIT License Copyright (c) 2019-2026 K0lb3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction medium — platform-specific wheel
Runtime dependencies 10 — lz4, brotli, Pillow, texture2ddecoder, etcpak, astc-encoder-py, fmod_toolkit, fsspec, attrs, tpk_ar
Maintenance actively maintained — 13 days since the last release
Last repo commit
First released
Downloads 210,150/month — #9,503 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: unitypy-1.25.3-cp310-cp310-macosx_10_9_x86_64.whl; unitypy-1.25.3-cp310-cp310-macosx_11_0_arm64.whl; unitypy-1.25.3-cp310-cp310-manylinux_2_24_i686.manylinux_2_28_i686.whl; unitypy-1.25.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; unitypy-1.25.3-cp310-cp310-musllinux_1_2_i686.whl; unitypy-1.25.3-cp310-cp310-musllinux_1_2_x86_64.whl; unitypy-1.25.3-cp310-cp310-win32.whl; unitypy-1.25.3-cp310-cp310-win_amd64.whl; unitypy-1.25.3-cp310-cp310-win_arm64.whl; unitypy-1.25.3-cp311-cp311-macosx_10_9_x86_64.whl; unitypy-1.25.3-cp311-cp311-macosx_11_0_arm64.whl; unitypy-1.25.3-cp311-cp311-manylinux_2_24_i686.manylinux_2_28_i686.whl; unitypy-1.25.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; unitypy-1.25.3-cp311-cp311-musllinux_1_2_i686.whl; unitypy-1.25.3-cp311-cp311-musllinux_1_2_x86_64.whl; unitypy-1.25.3-cp311-cp311-win32.whl; unitypy-1.25.3-cp311-cp311-win_amd64.whl; unitypy-1.25.3-cp311-cp311-win_arm64.whl; unitypy-1.25.3-cp312-cp312-macosx_10_13_x86_64.whl; unitypy-1.25.3-cp312-cp312-macosx_11_0_arm64.whl

Keywords: python, unity, unity-asset, python3, data-mining, unitypack, assetstudio, unity-asset-extractor

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Games/EntertainmentTopic :: Multimedia :: GraphicsTopic :: Software Development :: Libraries :: Python Modules

Tags

unity asset extractorextract unity game filesunity texture extractionparse unity bundlesunity asset editorgame data miningunity serialized file parser
game-moddingasset-extractionreverse-engineering

More Python Modules packages