/
README.txt
46 lines (31 loc) · 1.33 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
UnityPython
------------
UnityPython is a Python implementation which runs everywhere through IL2CPP, making it a good option for modding games.
UnityPython is based on CPython 3.10, but not fully compatible with CPython.
Usage (CLI)
------------
1. runtime: Download the binaries from the release page, and unpack them to a directory in '$PATH'.
2. compiler: 'pip install upycc' with a Python (>=3.8) distribution.
3. create a project as follow, 'cd' into it, and run this project with 'upy .'
- myupy_proj
- main.py
from .libs.some_lib import lib_func
args, kwargs = lib_func(1, 2, 3, a=1, b=2)
print(args, kwargs)
- libs
- some_lib.py
def lib_func(*args, **kwargs):
return args, kwargs
- out (for compiler output)
Usage (Unity Library)
----------------------
Under construction.
IDE Support
-----------------
UnityPython has excellent IDE support based on VSCode Pylance:
https://github.com/thautwarm/vscode-unitypython
Install 'VSCode-UnityPython' in VSCode, and use a Python environment with 'upycc' package installed is sufficient.
The UnityPython code will be compiled on-the-fly when you edit, and your game can set up a file watcher to hot reload everything.
Development
--------------------
Check out DEV.md in this project.