docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Run Python code from C#

    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.
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)