docs.unity3d.com
    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.
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023