Skip to content

Commit 4567f17

Browse files
committed
Version 0.0.6
Add reserved keywords `True` `False`
1 parent eb45a36 commit 4567f17

File tree

6 files changed

+223
-83
lines changed

6 files changed

+223
-83
lines changed

.github/workflows/python-publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ jobs:
3030
twine upload ./dist/*.tar.gz --skip-existing
3131
- name : Get Version
3232
id : get_version
33-
run : |
34-
$message = @(git log -1 --oneline --format=%s)
35-
$lines = $message.Split(' ')
36-
$version = $lines[1]
37-
38-
Write-Output "::set-output name=version::$version"
33+
shell: bash
34+
run : |
35+
commit_message=$(git log -1 --pretty=%s)
36+
version=$(echo "$commit_message" | awk '{print $2}')
37+
echo "version=$version" >> $GITHUB_OUTPUT
3938
- name: Create Release
4039
id: create_release
4140
uses: actions/create-release@v1

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.vscode/
21
build/
32
dist/
43
__pycache__/

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"name": "Python Debugger: Module",
10+
"type": "debugpy",
11+
"request": "launch",
12+
"module": "UnityPyTypetreeCodegen",
13+
"args": [
14+
"--files",
15+
"D:\\Reverse\\proseka_reverse\\game_binary\\v510\\exported\\shim",
16+
// "--json",
17+
// "c:\\Users\\mos9527\\TypetreeTests\\Test\\TypeTree.json",
18+
"--filter",
19+
"(Live2D|Cubism)+.*"
20+
]
21+
}
22+
]
23+
}

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
11
UnityPyTypetreeCodegen
22
---
3-
Static TypeTree code analysis and code generation for UnityPy
3+
(WIP) Static TypeTree code analysis and code generation for UnityPy
44

5+
Used in
6+
- https://github.com/mos9527/UnityPyLive2DExtractor
7+
- Uses generated classes in https://github.com/mos9527/UnityPyLive2DExtractor/tree/main/UnityPyLive2DExtractor/generated
8+
- https://github.com/mos9527/sssekai/
9+
- Used for AppHash in https://github.com/mos9527/sssekai/tree/main/sssekai/generated
10+
- https://github.com/mos9527/sssekai_blender_io/
11+
- Used for TransportDefine in https://github.com/mos9527/sssekai_blender_io/tree/master/scripts/rla_transport_defines/generated
12+
## Usage
13+
Example usage in `rla_transport_defines`
14+
```python
15+
env = UnityPy.load(...)
16+
from generated.Sekai.Streaming import TransportDefine
17+
from generated import UTTCGen_AsInstance
18+
19+
for reader in filter(lambda x: x.type == ClassIDType.MonoBehaviour, env.objects):
20+
name = reader.peek_name()
21+
if name.startswith("TransportDefine"):
22+
instance = UTTCGen_AsInstance(reader, "Sekai.Streaming.TransportDefine")
23+
# ...or `instance = UTTCGen_AsInstance(reader)` is `m_Script` field is accessible
24+
instance : TransportDefine
25+
print(f'"{name}":({instance.validBones}, {instance.validBlendShapes}),')
26+
# Possibly modify on the instance itself and saving it is also possible
27+
instance.validBones[0] = "BadBone"
28+
instance.save()
29+
env.save()
30+
```

UnityPyTypetreeCodegen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = (0, 0, 1)
1+
__version__ = (0, 0, 6)

0 commit comments

Comments
 (0)