Skip to main content

Unity Typetree to Python Module code generator

Project description

UnityPyTypetreeCodegen

(WIP) Static TypeTree code analysis and code generation for UnityPy

Used in

Usage

Example usage in rla_transport_defines

env = UnityPy.load(...)
from generated.Sekai.Streaming import TransportDefine
from generated import UTTCGen_AsInstance

for reader in filter(lambda x: x.type == ClassIDType.MonoBehaviour, env.objects):
    name = reader.peek_name()
    if name.startswith("TransportDefine"):
        instance = UTTCGen_AsInstance(reader, "Sekai.Streaming.TransportDefine")
        # ...or `instance = UTTCGen_AsInstance(reader)` is `m_Script` field is accessible
        instance : TransportDefine
        print(f'"{name}":({instance.validBones}, {instance.validBlendShapes}),')
        # Possibly modify on the instance itself and saving it is also possible
        instance.validBones[0] = "BadBone"
        instance.save()
env.save()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unitypytypetreecodegen-0.0.6.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unitypytypetreecodegen-0.0.6-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file unitypytypetreecodegen-0.0.6.tar.gz.

File metadata

  • Download URL: unitypytypetreecodegen-0.0.6.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for unitypytypetreecodegen-0.0.6.tar.gz
Algorithm Hash digest
SHA256 07c67b1c19f06f53fb5949075dc8d90c863af11a468fc0c9ff3fe685073d9300
MD5 c9362353e12ba7f811980cf7639f34ca
BLAKE2b-256 673b7c5bbbf808f7475bf324e6b2cfcfe37f4d8826f388867087ba5afa31ef30

See more details on using hashes here.

File details

Details for the file unitypytypetreecodegen-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for unitypytypetreecodegen-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f5221781862c0a06b7b8460de8d1c028755e5435361d4456b132d329cd63a6bd
MD5 7f383ba997b7617df56627ca406dd9f0
BLAKE2b-256 e4a778972197d0a22063933ced82ab6c1b29c27e016f59f167523750096a5141

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page