Skip to content

Maesla/PythonForUnity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PythonForUnity

Python Plugin System for Unity

This project implements a full plugin system with python as scripting language. You can create your own python scripts and run them on Unity. You can:

  • Run python scripts
  • Run Unity Code from python scripts
  • Use your own project classes inside the python scripts
PythonForUnity.mp4

External Tools

Extenject

This project uses advanced options of Extenject. https://github.com/Mathijs-Bakker/Extenject That said, the plugin system, the microkernel and the Python runner and all the core systems are quite decoupled from Extenject. Extenject is mainly used for setting the scene and the components

Pythonnet

Pythonnet is the library used to run python code inside the .net environment https://github.com/pythonnet/pythonnet

Setup

Go to Assets/StreamingAssets/Plugins/MicrokernelSystemSettings.json and set your python path

Known issues

  • The system is prepared to implement a ui part, but it's not implemented right now. The example provided is a json ui but probably using the new uxml unity ui would be a better option
  • Python virtual environment are not supported, but pythonnet supports them so it should be possible to add that feature

About

Python Plugin System for Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published