Does Cython suitable for Unity development?

61 views
Skip to first unread message

Bondarchuk

unread,
Jun 10, 2026, 4:10:12 PMJun 10
to cython-users
Hello! May be my question will look a bit strange, but I'm almost absolute beginner in terms of developments deeps. Several days ago I decided to start work over Unity game (Unity has it latest version). But I faced some little troubles with C# cause I haven't work with C languages almost at all. But I have some experience with Python and I got an idea why can't I just write a part of modules using Python and after that compile it in .exe or .dll files and use it in my game? After that I learned about Cython and it' ability to create almost native C/C++ modules. So, my question is can I use it also with Unity and make my life easier with it? Or may be it is not suitable after all?

Brent Elisens

unread,
Jun 11, 2026, 8:47:05 AMJun 11
to cython...@googlegroups.com
It isn't strange but probably easier to run your Python code as a separate process and communicate with your Unity application using networking protocols.

On Wed, Jun 10, 2026 at 4:10 PM Bondarchuk <mri17...@gmail.com> wrote:
Hello! May be my question will look a bit strange, but I'm almost absolute beginner in terms of developments deeps. Several days ago I decided to start work over Unity game (Unity has it latest version). But I faced some little troubles with C# cause I haven't work with C languages almost at all. But I have some experience with Python and I got an idea why can't I just write a part of modules using Python and after that compile it in .exe or .dll files and use it in my game? After that I learned about Cython and it' ability to create almost native C/C++ modules. So, my question is can I use it also with Unity and make my life easier with it? Or may be it is not suitable after all?

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cython-users/49f10f24-fc51-457a-aa27-d555f2bcf735n%40googlegroups.com.

Brent Elisens

unread,
Jun 11, 2026, 8:48:29 AMJun 11
to cython...@googlegroups.com
It isn't strange but probably easier to run your Python code as a separate process and communicate with your Unity application using networking protocols. Cython makes it faster and allows you to integrate with C libraries but Unity still requires C to be the bridge. If you run Python as a separate process and communicate via networking protocols, you probably will not need to write C# to interact directly with Cython.

Brent Elisens

unread,
Jun 11, 2026, 8:48:44 AMJun 11
to cython-users
It isn't strange but probably easier to run your Python code as a separate process and communicate with your Unity application using networking protocols. Cython makes it faster and allows you to integrate with C libraries but Unity still requires C to be the bridge. If you run Python as a separate process and communicate via networking protocols, you probably will not need to write C# to interact directly with Cython.

EpicC TV

unread,
Jun 11, 2026, 9:31:08 AMJun 11
to cython...@googlegroups.com
Thank you for answer! Idea to integrate Python modules into Unity looks little exotic for me but I will try to learn more about it.

But does it mean that it is not good idea to delegate some of internal gaming logic or something to Cython modules and better way is to try do it with C#? For example: enemies AI or definition of some game object classes?

Чт, 11 июня 2026 г. в 17:48, Brent Elisens <brente...@gmail.com>:
It isn't strange but probably easier to run your Python code as a separate process and communicate with your Unity application using networking protocols. Cython makes it faster and allows you to integrate with C libraries but Unity still requires C to be the bridge. If you run Python as a separate process and communicate via networking protocols, you probably will not need to write C# to interact directly with Cython.

On Wednesday, June 10, 2026 at 4:10:12 PM UTC-4 Bondarchuk wrote:
Hello! May be my question will look a bit strange, but I'm almost absolute beginner in terms of developments deeps. Several days ago I decided to start work over Unity game (Unity has it latest version). But I faced some little troubles with C# cause I haven't work with C languages almost at all. But I have some experience with Python and I got an idea why can't I just write a part of modules using Python and after that compile it in .exe or .dll files and use it in my game? After that I learned about Cython and it' ability to create almost native C/C++ modules. So, my question is can I use it also with Unity and make my life easier with it? Or may be it is not suitable after all?

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.

Brent Elisens

unread,
Jun 11, 2026, 12:11:11 PMJun 11
to cython-users
No, probably avoid Cython for the internal logic. It loses speed, and it becomes extremely complex. Also, sorry about my first answer repeating. My internet is ~60kbps. It showed an error when I replied.

David Woods

unread,
Jun 11, 2026, 1:02:07 PMJun 11
to cython...@googlegroups.com
From what I know of Unity (which isn't a lot), I'd advise against this.

Unity looks to be very tied to C#. There doesn't look to be a lot of support for using Python in it, and Cython will add an extra complication on top of that.

C (which Cython compiles to) is only distantly related to C#. So compiling it to C doesn't make it easier to use from C#.

This sounds like the sort of thing that would be much, much harder than just learning C#. It also sounds like you'd need significant unity/c# knowledge to do the initial setup.

Basically, unless you can find someone who's already done it and can tell you exactly how to do it, then it will be hard.

EpicC TV

unread,
Jun 12, 2026, 2:44:23 AMJun 12
to cython...@googlegroups.com
Thant you for your answer! According to your words it really seems like easier way is just to learn C# instead having incredible adventures trying to make Unity make friends with python which seems to be almost unsupportable by Unity.

Thank you! I really appreciate your help!

Чт, 11 июня 2026 г. в 22:02, David Woods <dw-...@d-woods.co.uk>:
--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.

EpicC TV

unread,
Jun 12, 2026, 2:44:33 AMJun 12
to cython...@googlegroups.com
Thank you for your help! You really helped me. Now I see may be easier way is just to learn C# and not to show off.

About your multiple answers: don’t worry! I’m very happy to receive it even in that count because otherwise I would just missed it. I really appreciate your help.

Чт, 11 июня 2026 г. в 21:11, Brent Elisens <brente...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages