Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

typetree_unity

PyPI Pylint MIT

A standalone type tree generator for Unity assemblies.

Better README coming in the future. Still in early development. Things will be changing rapidly.

Ultimate goal of this project is to provide lighter weight and more easily accessible options for data mining Unity games, and provide outputs in easily transportable formats.

There are two required parameters to generate a type tree:

  • Unity build version
  • Game assembly files built with Mono

Unity build version

The quickest way to determine which version of Unity a game is built against is to open one of the .assets files in the game's directory (typically located at [game_root]/[game]_Data/) in Notepad (pick a small assets file, any will work). One of the first ASCII text will be the version (ex. 2019.4.23f1). For a scripted approach, see UnityVersionFinderPy.

Game assembly files built with Mono

To determine if a game is already built with Mono, look in the game directory for a Assembly-CSharp.dll file (typically located at [game_root]/[game]_Data/Managed). If it does, then the game's assembly files were built with Mono.

If that's not the case, the game was likely built with il2cpp (will instead have a GameAssembly.dll file). To convert from il2cpp to Mono format, see Il2CppDumper.

Install:

pip install typtree_unity

CLI Usage:

usage: python -m typetree_unity [-h] [-c [...]] [-d] [-n] [-o] [-v] assembly_folder unity_version

Generates type trees from Unity assemblies and outputs in JSON format.

positional arguments:
  assembly_folder       folder containing assemblies (game's DLL files)
  unity_version         Unity build version

options:
  -h, --help            show this help message and exit
  -c [ ...], --classes [ ...]
                        classes to dump for the type tree (all if unspecified). Automatically dumps class dependencies.
  -d, --debug           enable debug output
  -n, --namesonly       only output class names (will output as classnames.json if output is not specified)
  -o , --output         type tree output file (default: [script_directory]\output\typetree.json). Supports relative paths.
  -v, --version         version of this package

Library Usage:

See typetree_unity/__main__.py for example usage of the typetree_unity module.

MIT License

Copyright (c) 2021 Jason Robinson

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 the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for typetree-unity 0.4.0a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typetree-unity 0.4.0a0
File Size Uploaded
typetree_unity-0.4.0a0.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for typetree-unity 0.4.0a0
File Interpreter ABI Platform
typetree_unity-0.4.0a0-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / typetree_unity-0.4.0a0.tar.gz

Download URL typetree_unity-0.4.0a0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
e1dc1014042391f4c3fa7e38dd3635b7f11900a8695fe526238398e8705ff5b6
BLAKE2b-256 checksum
How to use checksums
b20216d86940512dc039a0c76776a859c7782fd2f60dfdf5b9b386b28bd93e73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release files / typetree_unity-0.4.0a0-py3-none-any.whl

Download URL typetree_unity-0.4.0a0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0ac8910977cb2643162e9af4f84899a38dfd78c17e0714e1923b66478d205265
BLAKE2b-256 checksum
How to use checksums
0f2ca3f8f11224e28840a93fc09e91cc3ae1307d61e59a5fba6207c70615b078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release history Release notifications | RSS feed

This release

0.4.0a0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page