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 import UTTCGen_AsInstance, UTTCGen_GetClass

for reader in filter(lambda x: x.type == ClassIDType.MonoBehaviour, env.objects):
    name = reader.peek_name()
    if name.startswith("TransportDefine"):        
        from generated.Sekai.Streaming import TransportDefine
        # ...or TransportDefine = UTTCGen_GetClass("Sekai.Streaming.TransportDefine")
        # ...or TransportDefine = UTTCGen_GetClass(reader.read(check_read=False))
        instance = UTTCGen_AsInstance(TransportDefine, reader)                
        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.8.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.8-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unitypytypetreecodegen-0.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 6d3ad64ff38b715727ace881e93193320f8d6aeda56cb7fb8b14dd975d3eef86
MD5 6af42c3fbadec810067a4c9dc4fb7bb7
BLAKE2b-256 9a16ede0f4844924527e9f1b06619c0d27990c7ae18d5429445c3b6282d6bcac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for unitypytypetreecodegen-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a4b17a886cfb6a119505ddce4cda6c729e3158bff823e0a53d4bbef7a9f31d
MD5 72a6779cde3e11c2ef930e5b30817a9d
BLAKE2b-256 a7cb38a8b952e968774d406c8f9aff30c42be2b0991f31fc5dfefb10d4077e42

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