UE4 Editor not using hot reload files

I am trying to change the accepted radius value in the MoveToActor function in the AIController class.
MoveToActor(Player, 500.0f, true, true, true, 0, true);

When I do this I see that in the binaries folder unreal has created a new hot reload .dll file. However when I run my game the new accepted radius is not implemented. The editor seems to not recognise the new hot reload .dll and so my changes are not getting reflected. If I restart the editor it will crash and say:
“The game module “xxxxxx” could not be loaded. There may be an operating system error or the module may not be properly set up”.

This means I have to close my project and then build so the original .dll files can be deleted and remade (since the project is now no longer using them windows will allow them to be deleted). My changes will now be reflected.

Does anyone know how I can get the editor to recognise my new hot reload files.

Just found this error:

LogModuleManager:Warning: ModuleManager: Unable to load module 'C:/Users//Documents/Unreal Projects/hostage_rescue/Binaries/Win64/UE4Editor-hostage_rescue-9203.dll' because the file couldn't be loaded by the OS.
Warning: HotReload failed, reload failed /Script/hostage_rescue.

Are you running editor with debugger attached?
If then run editor without debugger.

Hey , thanks for your response.
I am not running the editor with the debugger attached. That above message was retrieved by using the logging feature in the editor, located in “window > developer tools > output log”.

Whether I build/compile using the editor or visual studio I still get the same issue.

Have found which section of code causes the hot reload to fail.

ASoldier* Player = Cast<ASoldier>(GetWorld()->GetFirstPlayerController()->GetPawn());

After doing some more debugging I have found this line.

2b10:14d8 @ 16820234 - LdrpProcessWork

  • ERROR: Unable to load DLL: “UE4Editor-FPSTemplate-7976.dll”,
    Parent Module:
    “C:\Users\Documents\Unreal
    Projects\hostage_rescue\Binaries\Win64\UE4Editor-hostage_rescue-1299.dll”,
    Status: 0xc0000135 ‘UE4Editor.exe’
    (Win32): Unloaded
    ‘C:\Users\Documents\Unreal
    Projects\hostage_rescue\Binaries\Win64\UE4Editor-hostage_rescue-1299.dll’

It seems to be expecting a .dll to be created called UE4Editor-FPSTemplate-7976.dll", however since no code has been changed in the FPSTemplate Module I created the dll does not get created but some .lib files do.

So after a couple days of messing around I found the problem.

It turns out that since I have organised my code into modules, when I tell UE4 or Visual Studio to compile it will link both the modules since a class from Module A relies on Module B. The problem arises when UE4 for some reason expects there to be a hot reload DLL from both modules not just the one that has had some code changes applied to it.

If I go into Developer Tools > modules in the UE4 editor and select to compile only the module that has had code edited on it then my hot reloading works again.

This kind of feels like a bug as why is UE4 expecting there to be a new hot reload DLL for code that has not changed?

The below link was very helpful in helping me figure out the problem:

indeed, that work here ! Thanks a lot !

in bug tracker it looks like they fixed an issue affecting 4.15/16/17 about multi modules hot reload ( fixed in 4.17.1 ) we are still in 4.16.3 here, but if ever one of you moved to 4.17.1 i would be glad to know if the bug is fixed !