Buidling with DebugGame produces game dll, editor expects other dll

Hi all, I’m working on a project with C++ an editor compiled from source. I generated Visual Studio files using the Build/BatchFiles/GenerateProjectFiles.bat.

When I build the resulting solution with DebugGame Editor as build target, it results in the following dll: Binaries/Win64/UE4Editor-MyGame-Win64-DebugGame.dll. When I start debugging though, from Visual Studio with my game set as StartUp project, the editor boots without issue but it does not link to the above dll but looks for Binaries/Win64/UE4Editor-MyGame.dll instead.

As a result, at first boot it asks whether to rebuild the dll, and at all subsequent boots I have to press Compile in the editor to have my code changes actually loaded (and restart the editor again when I make changes that cannot be hot reloaded). Does anyone know how to resolve this?

One option I considered is trying to make sure Visual Studio builds into UE4Editor-MyGame.dll rather than …-Win64-DebugGame, but I’m not sure how to configure this. I’m not used to working with NMake. I’m more puzzled by why this issue occurs in the first place even after regenerating project files. Any help is appreciated!

Generally, when I’m working I start the engine in DebugGame from Visual Studio itself (Ctrl+F5 by default). If you have to restart the editor, you could simply go back to VS and run it this way again. This will always launch the editor in the current target. Then, whenever I check in my changes I make sure to build the Development Editor with the developer close to clean up any hotload DLLs and make sure I have a fully built Development Editor for my artists / level designers since they could care less about debugging the game.

I would recommend against building DebugGame DLLs with the name of the Development solution, as you’re likely to run into issues in the future.

Hi , thanks for your reply. My problem is that I am starting from Visual Studio, but it does not link to the dll that was just compiled in Visual Studio- the one with Win64-DebugGame appended in the name. Instead it says that UE4Editor-MyGame.dll could not be found and ask whether I want to recompile it. Have you had this before?

I agree with you on avoiding to change the dll name to circumvent this.

Right click the UE4 project, Properties, Debugging, add -debug to the command arguments.

Works perfectly, thanks again ! :smiley: