Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 22d9b35

Browse files
committed
Update README
1 parent 78f1465 commit 22d9b35

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ General purpose [Live2D](https://www.live2d.com/) Asset recovery tool built w/ [
88
As the name suggests, this project is heavily inspired by [Perfare/UnityLive2DExtractor](https://github.com/Perfare/UnityLive2DExtractor). With a few key differences:
99
- All Live2D types are implemented with [dumped TypeTree](https://github.com/mos9527/UnityPyLive2DExtractor/blob/main/external/typetree_cubism.json) and [generated types](https://github.com/mos9527/UnityPyLive2DExtractor/blob/main/typetree_codegen.py). This should help with compatibility issues.
1010
- Do note, however, that you may need to update the TypeTree if the Live2D version changes.
11-
- Generate the TypeTree with [typetree_codegen](https://github.com/mos9527/UnityPyLive2DExtractor/blob/main/typetree_codegen.py) and replace the existing TypeTree at `UnityPyLive2DExtractor/generated`
11+
- Generate the TypeTree with [UnityPyTypetreeCodegen](https://github.com/mos9527/UnityPyTypetreeCodegen) and replace the existing TypeTree at `UnityPyLive2DExtractor/generated`
1212
```bash
13-
python typetree_codegen.py type_tree_cubism.json UnityPyLive2DExtractor/generated
13+
UnityPyTypetreeCodegen --json external/typetree_cubism.json --outdir UnityPyLive2DExtractor/generated
1414
```
1515
- New (not necessarily better) asset discovery method. Though proven to be more reliable in some cases.
1616

UnityPyLive2DExtractor/generated/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def reduce_init(clazz, **d):
2929
reduce_arg = getattr(sub, "__args__", [None])[0]
3030
if k in REFERENCED_ARGS: # Directly refcounted
3131
reduce_arg = sub = lambda x: x
32-
if isinstance(d[k], list):
32+
if reduce_arg is not None and isinstance(d[k], list):
3333
if hasattr(reduce_arg, "__annotations__"):
3434
setattr(self, k, [reduce_arg(**x) for x in d[k]])
3535
else:
3636
setattr(self, k, [reduce_arg(x) for x in d[k]])
37-
elif isinstance(d[k], dict) and hasattr(sub, "__annotations__"):
37+
elif reduce_arg is not None and isinstance(d[k], dict) and hasattr(sub, "__annotations__"):
3838
setattr(self, k, sub(**d[k]))
3939
else:
4040
if isinstance(d[k], dict):

0 commit comments

Comments
 (0)