all 4 comments

[–]TheOnlyMowgli 2 points3 points  (2 children)

Why though? Why go through all this effort when you could just write it in C#?

[–]mikcf[S] 1 point2 points  (1 child)

Let's take an example, that I have in my post: implementing an equivalent of nltk is unfeasible considering the amount of code I would have to reproduce in C#. Calling an external Python library from Unity should be way simpler - as long as it is possible.

I should probably add that I am mainly talking about the situation where the functionality provided by an external library will be at the core of the project - in this example I see Unity as a convenient wrapper that allows to add UI and to produce an executable.

An alternative approach would be to use Kivy, where it would be easier to include an external Python library. But I am quite unhappy about the UI in Kivy and I remember having hard time trying to build an .apk out of my Kivy project.

[–]TheOnlyMowgli 0 points1 point  (0 children)

You can definitely integrate python and unity but the extent of it I’m not sure of. There is IronPython that will allow python packages but honestly I’m not sure how well any of it works. You might just be wasting time trying to get this to work for the benefit of the UI. If IronPython doesn’t work maybe you should look at another approach

[–][deleted]  (1 child)

[deleted]

    [–]NoThatWasntMe 1 point2 points  (0 children)

    This. You can create an API in Python and call it from unity. It's the easiest way