C# and NativeAOT
Posted: 10 May 2023, 23:26
I've been a C# / Unity developer for over 10 years now, but I'm now working on an Unreal project. I'm very excited with all the new tech that came out in .net 7 around NativeAOT. It got me wondering. Has anyone tried to make a C# NoesisGUI project and publish the DLL with NativeAOT and load and run that DLL from inside of Unreal?
I realize it's not the most idea setup. Having Unreal send data to the DLL to update the UI would be more of a pain, but if you have a lot of UI that only relies on basic mouse/keyboard input, it could be a big win. All our backend services are written in C#, so it would be nice not needing to duplicate all the communication classes with C++ counterparts. Also, giving the UI team the ability to create all the game UI outside of Unreal is also a big win IMO.
On a side note, here is a great article showing how "easy" it is to create a native DLL and load/use it in C++ (https://joeysenna.com/posts/nativeaot-in-c-plus-plus).
I realize it's not the most idea setup. Having Unreal send data to the DLL to update the UI would be more of a pain, but if you have a lot of UI that only relies on basic mouse/keyboard input, it could be a big win. All our backend services are written in C#, so it would be nice not needing to duplicate all the communication classes with C++ counterparts. Also, giving the UI team the ability to create all the game UI outside of Unreal is also a big win IMO.
On a side note, here is a great article showing how "easy" it is to create a native DLL and load/use it in C++ (https://joeysenna.com/posts/nativeaot-in-c-plus-plus).