Run Python code from C#
Important
Support for the Python Scripting package is scheduled to end as of Unity 6.1.
Run Python code directly from C# to integrate your own features in Unity.
Section | Description |
---|---|
Run Python instructions from C# | Use the PythonRunner.RunString method to execute a single Python instruction from C#. |
Run Python script files from C# | Use the PythonRunner.RunFile method to execute a Python script file from C#. |
Use Python APIs in C# | Use Python APIs in C# with Python for .NET. |