Unity Typetree to Python Module code generator
Project description
UnityPyTypetreeCodegen
(WIP) Static TypeTree code analysis and code generation for UnityPy
Used in
- https://github.com/mos9527/UnityPyLive2DExtractor
- Uses generated classes in https://github.com/mos9527/UnityPyLive2DExtractor/tree/main/UnityPyLive2DExtractor/generated
- https://github.com/mos9527/sssekai/
- Used for AppHash in https://github.com/mos9527/sssekai/tree/main/sssekai/generated
- https://github.com/mos9527/sssekai_blender_io/
- Used for TransportDefine in https://github.com/mos9527/sssekai_blender_io/tree/master/scripts/rla_transport_defines/generated
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unitypytypetreecodegen-0.0.5.tar.gz.
File metadata
- Download URL: unitypytypetreecodegen-0.0.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53df9d485b5c6aa00cc029a25b59c751544c908e2ab5f222d8b6556a4263c024
|
|
| MD5 |
ba8de63e96945670264cf98419a0e256
|
|
| BLAKE2b-256 |
4afd421cf7130cff5db34e177ae9bf1650b042c20e0a80dd1e790c7f3b490f8f
|
File details
Details for the file unitypytypetreecodegen-0.0.5-py3-none-any.whl.
File metadata
- Download URL: unitypytypetreecodegen-0.0.5-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4daddcf32ec4e5f1528198e9fb19069d5ef6a8bceb1a67426a4151eb19f40b33
|
|
| MD5 |
895603788a6c5b6d35bd4caa3abe7485
|
|
| BLAKE2b-256 |
6feae44c16e1460fb32c69a3248edffc491f155e92f7bf363b1cac2b3593aab4
|