I have an Unreal project with 2 core pieces:
- A normal Unreal game project (“GameProject”)
- A C# uprogram project (“DotNetProject”)
Currently, GameProject runs a dotnet hosting environment via packaged dlls (hostfxr), and in this environment I load prebuilt dlls of DotNetProject.
I’d like to be able to add DotNetProject as a dependency of GameProject, so that when I’m developing in Visual Studio and make a change to DotNetProject, and then try to run GameProject, it knows to rebuild DotNetProject.
The closest I’ve gotten is running a buildgraph which first calls a dotnet action to build the C# program project, then copies its output to a folder where GameProject looks during packaging. The problem here is I frequently forget to run this graph before my next F5 debugging session, and so I debug with stale dlls.
Is there any way to get UBT and/or Visual Studio to recognize DotNetProject as a dependency of GameProject and automatically build it if it’s out of date?