Mono C# Bindings for Unreal 4


With the fantastic news on the full source code release of Unreal 4 I’m sure more than a few of you are thinking about whether it might be worth to start working on C# bindings for the code. I thought I might kick off a thread here with this focus and to see if anyone is interested in starting a open working group on developing a Mono C# interface for U4.

Yep, I’m thinking about it and could join forces with anyone who’s also willing to do so. It would be great to have both engine and editor bindings

+1 I am in.

I would love to see this!

I only have a year of C++ and 6 years of C#. So If I could get C# in Unreal 4… that would speed up my productivity by god knows how much!

mono is multiplatform. .NET is windows locked.

Unreal is multiplatform so if anything Mono should only considiration

You’re going to have the same LGPL licensing problems that Unity has to deal with, at least on iOS and any other platform which requires static linking.

Take a look at SWIG, which lets you generate bindings for a variety of languages, C#/Mono included, without having to write much language-specific code. Lua and Python are nice targets which don’t have the same licensing baggage.

When development starts up count me in. Hopefully my efforts with JS using V8 will be of use to you and we can collaborate to create something amazing.

The only noteworthy thing you should all keep in mind is that the GPL and LGPL are unacceptable licenses when working within UE4.

I have also thrown the great majority of the UE4 Static Linking tutorial up on the wiki.

Can’t we get around the licensing problem by just making a plugin?

Muy buena la idea!!!:slight_smile:

I think it’s a very good idea. The same is also existing for other engines and it is very popular.

I’m also in for getting this working.

I’ll probably have a proof of concept this weekend.

Well then it means to be dynamically linked, if Unity managed to do that without being infected by GPL (this licence is designed to spread :p), UE might do that too.

Count me in also if you need help… I tend to do a ton of pinvokes and unmanaged exports to c from c#

I’m also quite interested in C# support on UE4 but Mono licenses are lackustre.

I would not use mono myself… I am only interested in developing for windows anyways so hooking up the native runtime wont be an issue.

Interesting, but how can this be done ? What would be the main steps ?

I started working on this over the weekend, here is what I’ve learned so far for anyone wanting to help us get Mono in Unreal.

After getting Mono embedded, the fun part will be creating the bindings between C++ and C#, such as base classes and when to call into C#. Also intelligently loading DLLs and discovering what classes to call.

The CryMono example uses Mono 3.0.4 which is pretty old (Latest is 3.2.8), but it still works.

very interesting project

for creating the bindings maybe something like Pinvoke interop could work. It does not support Mono atm…

you could take a class and just add /clr to the compiler if on wiundows. This is for windows only and no mono…