{"id":28645443,"url":"https://github.com/mos9527/unitypytypetreecodegen","last_synced_at":"2026-02-28T21:30:55.205Z","repository":{"id":278204035,"uuid":"934740806","full_name":"mos9527/UnityPyTypetreeCodegen","owner":"mos9527","description":"Static Typetree to Python Module code generator ","archived":false,"fork":false,"pushed_at":"2025-11-08T15:58:04.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-08T16:44:07.954Z","etag":null,"topics":["unitypy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mos9527.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-18T10:29:16.000Z","updated_at":"2025-11-08T15:57:38.000Z","dependencies_parsed_at":"2025-04-13T08:35:25.138Z","dependency_job_id":"0cac92fd-f96b-4608-b526-9632cd6d30d1","html_url":"https://github.com/mos9527/UnityPyTypetreeCodegen","commit_stats":null,"previous_names":["mos9527/unitypytypetreecodegen"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mos9527/UnityPyTypetreeCodegen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mos9527%2FUnityPyTypetreeCodegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mos9527%2FUnityPyTypetreeCodegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mos9527%2FUnityPyTypetreeCodegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mos9527%2FUnityPyTypetreeCodegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mos9527","download_url":"https://codeload.github.com/mos9527/UnityPyTypetreeCodegen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mos9527%2FUnityPyTypetreeCodegen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29952236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["unitypy"],"created_at":"2025-06-13T01:07:19.545Z","updated_at":"2026-02-28T21:30:55.182Z","avatar_url":"https://github.com/mos9527.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"UnityPyTypetreeCodegen\n---\n(WIP) Static TypeTree code analysis and code generation for UnityPy\n\nUsed in \n- https://github.com/mos9527/UnityPyLive2DExtractor\n    - Uses generated classes in https://github.com/mos9527/UnityPyLive2DExtractor/tree/main/UnityPyLive2DExtractor/generated\n- https://github.com/mos9527/sssekai/\n    - Used for AppHash in https://github.com/mos9527/sssekai/tree/main/sssekai/generated\n- https://github.com/mos9527/sssekai_blender_io/\n    - Used for TransportDefine in https://github.com/mos9527/sssekai_blender_io/tree/master/scripts/rla_transport_defines/generated\n## Usage\n### Installation\n```bash\npip install UnityPyTypetreeCodegen\n```\n### Generating code\n- You can generate code from a TypeTree JSON dump generated with https://github.com/K0lb3/TypeTreeGenerator\n```bash\nUnityPyTypetreeCodegen --json \"path_to_typetree_json_dump\" --output \"generated_moudle_path\"\n```\n- Or dump the TypeTree using https://github.com/UnityPy-Org/TypeTreeGeneratorAPI automatically (WIP)\n```bash\nUnityPyTypetreeCodegen --files \"path_to_Assembly-CSharp_and_other_mono_dlls\" --output \"generated_moudle_path\"\n```\n- The emitted module will be structured like this\n```\ngenerated\n├── __init__.py\n└── Live2D\n    └── Cubism\n        ├── Core\n        │   ├── __init__.py\n        │   └── Unmanaged\n        │       └── __init__.py\n        ├── Framework\n        │   ├── __init__.py\n        │   ├── Expression\n        │   │   └── __init__.py\n        │   ├── HarmonicMotion\n        │   │   └── __init__.py\n        │   ├── Json\n        │   │   └── __init__.py\n        │   ├── LookAt\n        │   │   └── __init__.py\n        │   ├── Motion\n        │   │   └── __init__.py\n        │   ├── MotionFade\n        │   │   └── __init__.py\n        │   ├── MouthMovement\n        │   │   └── __init__.py\n        │   ├── Physics\n        │   │   └── __init__.py\n        │   ├── Pose\n        │   │   └── __init__.py\n        │   ├── Raycasting\n        │   │   └── __init__.py\n        │   ├── Tasking\n        │   │   └── __init__.py\n        │   └── UserData\n        │       └── __init__.py\n        └── Rendering\n            ├── __init__.py\n            └── Masking\n                └── __init__.py\n\n20 directories, 18 files\n```\n### Using the generated module\nExample usage in `rla_transport_defines`\n```python\nenv = UnityPy.load(...)\nfrom generated import UTTCGen_AsInstance, UTTCGen_GetClass\n\nfor reader in filter(lambda x: x.type == ClassIDType.MonoBehaviour, env.objects):\n    name = reader.peek_name()\n    if name.startswith(\"TransportDefine\"):        \n        from generated.Sekai.Streaming import TransportDefine\n        # ...or TransportDefine = UTTCGen_GetClass(\"Sekai.Streaming.TransportDefine\")\n        # ...or TransportDefine = UTTCGen_GetClass(reader.read(check_read=False))\n        instance = UTTCGen_AsInstance(TransportDefine, reader)                \n        print(f'\"{name}\":({instance.validBones}, {instance.validBlendShapes}),')\n        # Possibly modify on the instance itself and saving it is also possible\n        instance.validBones[0] = \"BadBone\"\n        instance.save()\nenv.save()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmos9527%2Funitypytypetreecodegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmos9527%2Funitypytypetreecodegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmos9527%2Funitypytypetreecodegen/lists"}