├── .github
└── workflows
│ └── python-publish.yml
├── .gitignore
├── README.md
├── UnityPyLive2DExtractor.spec
├── UnityPyLive2DExtractor
├── __init__.py
├── __main__.py
└── generated
│ ├── Live2D
│ └── Cubism
│ │ ├── Core
│ │ ├── Unmanaged
│ │ │ └── __init__.py
│ │ └── __init__.py
│ │ ├── Framework
│ │ ├── Expression
│ │ │ └── __init__.py
│ │ ├── HarmonicMotion
│ │ │ └── __init__.py
│ │ ├── Json
│ │ │ └── __init__.py
│ │ ├── LookAt
│ │ │ └── __init__.py
│ │ ├── Motion
│ │ │ └── __init__.py
│ │ ├── MotionFade
│ │ │ └── __init__.py
│ │ ├── MouthMovement
│ │ │ └── __init__.py
│ │ ├── Physics
│ │ │ └── __init__.py
│ │ ├── Pose
│ │ │ └── __init__.py
│ │ ├── Raycasting
│ │ │ └── __init__.py
│ │ ├── Tasking
│ │ │ └── __init__.py
│ │ ├── UserData
│ │ │ └── __init__.py
│ │ ├── Utils
│ │ │ └── __init__.py
│ │ └── __init__.py
│ │ ├── Garage
│ │ └── __init__.py
│ │ ├── Rendering
│ │ ├── Masking
│ │ │ └── __init__.py
│ │ └── __init__.py
│ │ └── Samples
│ │ ├── AsyncBenchmark
│ │ └── __init__.py
│ │ ├── LookAt
│ │ └── __init__.py
│ │ ├── Masking
│ │ └── __init__.py
│ │ ├── OriginalWorkflow
│ │ ├── Demo
│ │ │ └── __init__.py
│ │ ├── Expression
│ │ │ └── __init__.py
│ │ └── Motion
│ │ │ └── __init__.py
│ │ └── Raycasting
│ │ └── __init__.py
│ └── __init__.py
├── external
└── typetree_cubism.json
├── setup.py
└── typetree_codegen.py
/.github/workflows/python-publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 |
3 | on:
4 | push:
5 | workflow_dispatch:
6 |
7 | jobs:
8 | build-and-release:
9 | if: "contains(github.event.head_commit.message, 'Version')"
10 | runs-on: windows-latest
11 | steps:
12 | - uses: actions/checkout@v2
13 | - name: Set up Python
14 | uses: actions/setup-python@v2
15 | with:
16 | python-version: '3.10'
17 | - name: Install dependencies
18 | run: |
19 | python -m pip install --upgrade pip
20 | python -m pip install --upgrade setuptools wheel build twine
21 | python -m pip install Pyinstaller
22 | python -m pip install -e .
23 | - name: Build package
24 | run: python -m build --no-isolation
25 | - name: Publish package
26 | env:
27 | TWINE_USERNAME: __token__
28 | TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
29 | run: |
30 | twine upload ./dist/*.whl --skip-existing
31 | twine upload ./dist/*.tar.gz --skip-existing
32 | - name: Build Windows executables
33 | run: |
34 | pyinstaller UnityPyLive2DExtractor.spec
35 | - name : Get Version
36 | id : get_version
37 | run : |
38 | $message = @(git log -1 --oneline --format=%s)
39 | $lines = $message.Split(' ')
40 | $version = $lines[1]
41 |
42 | Write-Output "::set-output name=version::$version"
43 | - name: Create Release
44 | id: create_release
45 | uses: actions/create-release@v1
46 | env:
47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 | with:
49 | tag_name: ${{ steps.get_version.outputs.version }}
50 | release_name: Version ${{ steps.get_version.outputs.version }}
51 | - uses: actions/upload-release-asset@v1.0.1
52 | env:
53 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54 | with:
55 | upload_url: ${{ steps.create_release.outputs.upload_url }}
56 | asset_path: dist/UnityPyLive2DExtractor.exe
57 | asset_name: UnityPyLive2DExtractor.exe
58 | asset_content_type: application/application/vnd.microsoft.portable-executable
59 | - uses: eregon/publish-release@v1
60 | env:
61 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62 | with:
63 | release_id: ${{ steps.create_release.outputs.id }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | build/
3 | dist/
4 | __pycache__/
5 | *.egg-info
6 | dump
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UnityPyLive2DExtractor
2 | [](https://github.com/mos9527/UnityPyLive2DExtractor/blob/main/.github/workflows/python-publish.yml)
3 | [](https://GitHub.com/mos9527/UnityPyLive2DExtractor/releases/)
4 | [](https://github.com/psf/black)
5 |
6 | General purpose [Live2D](https://www.live2d.com/) Asset recovery tool built w/ [UnityPy](https://github.com/K0lb3/UnityPy) and [sssekai](https://github.com/mos9527/sssekai)
7 |
8 | As the name suggests, this project is heavily inspired by [Perfare/UnityLive2DExtractor](https://github.com/Perfare/UnityLive2DExtractor). With a few key differences:
9 | - 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.
10 | - 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`
12 | ```bash
13 | python typetree_codegen.py type_tree_cubism.json UnityPyLive2DExtractor/generated
14 | ```
15 | - New (not necessarily better) asset discovery method. Though proven to be more reliable in some cases.
16 |
17 | ## Installation
18 | - Install the script from PyPI
19 | ```bash
20 | pip install UnityPyLive2DExtractor
21 | ```
22 | - Or, you can use the pre-built executables for Windows from [Releases](https://github.com/mos9527/UnityPyLive2DExtractor/releases/).
23 | ## Usage
24 | ```bash
25 | UnityPyLive2DExtractor