Hello.
I want to know how to import & run python3.x script in unity.
Thanks.
8204340–1070577–LanguageModel3.zip (4.19 KB)
Hello.
I want to know how to import & run python3.x script in unity.
Thanks.
8204340–1070577–LanguageModel3.zip (4.19 KB)
AFAIK there is no in-built facility for this. There may be asset store packages to do this.
Unity does have editor-only support for some Python functionality. Here was their announcement:
A clunky alternative might be to just run the python code as a separate process and handle communication with it over UDP or something:
So, in Unity, something like:
var pythonArgs = "your_python_program.py param1 param2";
System.Diagnostics.Process.Start("python", pythonArgs); // assuming python installed on test machine
…and then do something like this:
https://stackoverflow.com/questions/28309832/broadcasting-udp-message-from-c-sharp-to-python
(except you’d communicate over localhost instead of separate machines)