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

Uploaded Python 3

File details

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

File metadata

  • Download URL: unitypytypetreecodegen-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 504edbb644a7db80e589fae321e5a8e24c05ea214714544c6e2849f5e2dd6da7
MD5 dfeff9ffca73f27f3d85dd3e3d4ac4ab
BLAKE2b-256 9ba5abf6c33eb8e435afec84c94bed90578d55cd99b359dc5c6aa1ae2cd8dd5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for unitypytypetreecodegen-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 be56f2ea06c03f1ff5b1f9374aa93e999d4dc652a8ce6a2a55e426d870fea966
MD5 c640b389db8f3508bd4cd5506a5dd308
BLAKE2b-256 0e39706ed35d4930be486805dd7615990007302e5d491ad4a48e178420103ede

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