FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

using UnityEngine; using IronPython.Hosting; namespace Exodrifter.UnityPython.Examples { public class PythonHelloWorld : MonoBehaviour { void Start() { var engine = Python.CreateEngine(); var scope = engine.CreateScope(); string code = "str = 'Hello world!'"; var source = engine.CreateScriptSourceFromString(code); source.Execute(scope); Debug.Log(scope.GetVariable("str")); } } }

Back | FazBrowse Home | New Git URL