Use C# to script in Unreal Engine 4 now, courtesy of

Without some additional wrapper code (intimate knowledge of the codebase), I don’t think C# support of any kind will be here quickly. Sweeney said something in the other thread about there being an alienation problem with slightly different C# syntax, and a few other reasons why they probably won’t add . That seems fair to me, I just disagree (little features like array bounds checking alone are helpful for me) and will make my own custom solution that’s probably not suited for general use. I will try to release it open source though.

I’m looking at , it seems like it does exactly what I want. https://csscriptsource.codeplex.com

There are a few issues with what I’m attempting. Mostly I am just calling directly between c++ and c# using little gem called UnmanagedExports (VS plugin; requires VS Community).

  1. String marshalling is messy and confusing and I’d rather go without it. Especially for speed e.g. FindGameEntity(“OnFire”) on Update(). So I might get around passing strings altogether (and use hashes)

  2. I want my C# codebase to debug and recompile while the game is running. So that means a separate VS instance and some kind of remote procedure calling. (I might use named pipes or websockets)

  3. Avoiding c++/cli is cleaner and makes for less maintenance and chances of messing up.

  4. Going the plain dynamic C# DLL route (LoadLibrary/FreeLibrary) looks a bit weird to me because in .Net it hangs onto the DLL until the program exits, and I’m not really comfortable with the solution.

  5. I will avoid adding BP support for my solution because I already personally find it difficult to read and implement the UE4 documentation examples, it’s just me, I’m not a natural programmer so I’d rather not.