This repository was archived by the owner on Feb 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33- Supports nested types
44- Supports inheritance
55- Automatically resolves import order and dependencies
6+ - Generated classes support nested types, and will be initialized with the correct types even with nested dicts
67
78NOTE:
89- Cannot resolve namespace conflicts if the same class name is defined in multiple namespaces
910- Missing type definitions are marked with # XXX: Fallback of {org_type} and typedefed as object
11+ - Circular inheritance is checked and raises RecursionError
12+ - The output order (imports, classes) are deterministic and lexicographically sorted
13+ - The output is emitted in lieu of the Namespace structure of the TypeTree dump, presented as Python modules in directories
14+
15+ USAGE:
16+
17+ python typetree_codegen.py <typetree_dump.json> <output_dir>
1018"""
1119
1220# From https://github.com/K0lb3/UnityPy/blob/master/generators/ClassesGenerator.py
@@ -288,7 +296,7 @@ def __main__():
288296 parser .add_argument (
289297 "infile" ,
290298 type = str ,
291- help = "Input file . Dump with https://github.com/K0lb3/TypeTreeGenerator" ,
299+ help = "Input TypeTree Dump in JSON format . Dump with https://github.com/K0lb3/TypeTreeGenerator" ,
292300 )
293301 parser .add_argument ("outdir" , type = str , help = "Output directory" )
294302 parser .add_argument ("--log-level" , default = "INFO" , help = "Set logging level" )
You can’t perform that action at this time.
0 commit comments