I was thinking to create dialog trees with Python in Unity. I was curious if I will using in one project c# scripts and python will not cause problems with compiling scripts. Also I did found few articles about adding Python to unity, but I am not 100% sure if they are actual and they didn't been really detailed enough. Right now I am using the newest version of unity and vs 2017. I already install PythonIron, but also the newest version of it (I lazily just follow where download page leads me).

I was wondering if somebody could enlighten me with how to actually add Python to Unity and how does it work with other scripts (for example, could I have a function in c# script which could be coming from python script?)

Thanks for any kind of help.

  • \$\begingroup\$ I just found this thread about integrating Python on Unity's forum, but in general I would say "don't" forum.unity3d.com/threads/python-interpreter-in-unity.86461 \$\endgroup\$
    – jhocking
    Aug 1, 2017 at 20:59
  • \$\begingroup\$ @jhocking is there any reason why I shouldn't do it? Could it work badly or there is some different reason? Also, I have seen this post, but it doesn't really explain how to do it. Or at least I am not able to figured this out. \$\endgroup\$ Aug 2, 2017 at 9:55
  • \$\begingroup\$ It's not so much that it could work badly (although frankly it could) but more that this is a really difficult and not-supported way to do something that wouldn't be an improvement over programming it with C#. \$\endgroup\$
    – jhocking
    Aug 2, 2017 at 10:16
  • \$\begingroup\$ So basically is better just to figured out different way with use of c# in unity. What about Unreal and connecting Python with c++? I am asking just from curiosity. @jhocking \$\endgroup\$ Aug 2, 2017 at 11:12
  • \$\begingroup\$ I know essentially nothing about Unreal. I think you should use C# in Unity but I'm a touch biased :P amazon.com/Unity-Action-Multiplatform-Game-Development/dp/… \$\endgroup\$
    – jhocking
    Aug 2, 2017 at 15:13

1 Answer 1



The websites shows how to run IronPython Script in Visual Studio. It looks promising, although after consideration I do not think that creating Dialog Trees in Unity with Python is the best idea any more.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .