Ue4 plugin written in C#

Hi guys,

I would like to try to integrate UE4 with an external system. I have access to an API written sepcifically to allow integration with this external system but this is a C# API…
My question is: Is it possible to write a UE4 plugin using C# instead of C++? Since this is the language available for this API integration.

Thanks a bunch!

You can’t write a plugin in C#. You can call a C# DLL from C++ using either COM or by hosting the .NET runtime. Here is a stackoverflow answer that should help:

Thanks man, I’ll try to look into that then. Cheers!

If you make a Visual C++ DLL (MS CLR) as a “bridge” it’s easier.

Hey Bruno, thanks. I can also try that sure… Do you have a link to an explanation or documentation of what you mean? Or would googling “MS CLR” probably be enough? Cheers!

.NET programming with C++/CLI | Microsoft Learn

You can build an external DLL. I do this with NVidia’s Compute SDK to kick off jobs on the compute cores. Then call the dll like you would any other. Unfortunately it turns it into a build the DLL, then build the UE project. Which isn’t the best work flow.