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.4.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.4-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unitypytypetreecodegen-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 deeb346f5f1a84a12244d7a9b9ec8dc44cc211f8e3a52e348ec06254e48719de
MD5 f77563b018762bd2ed069690aa2e41bc
BLAKE2b-256 2f822f30974da2cdac62d7af2f6831771ac518a9b8fb8e1dee9ef5ed24fd77d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for unitypytypetreecodegen-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 486c96f1bc0eec7f4f21d087f16f63e26466dbc33c89a49b2d6239286987d77a
MD5 2f66ba079828caf7c24909ddb6c4806d
BLAKE2b-256 8295d161fe6cf1595100be239549a98627f8dc22640605ad9611616728eb7472

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