Hot Reloading not running latest build

I have just installed 4.16.3 from the Launcher.

Created a new project based on the Side scrolling platformer template as I am experimenting with a simple idea in code. So this is a completely clean build.

I have built my code and just dropped it into an Actor which I have dropped into the scene.

If I make any changes, build in VS it completes successfully, the engine recognises the new code and completes a hot reload, but when I hit play, it runs the old version of the code. I have to quit and reload the engine to get the latest build to execute.

At this point I am just changing a log/message text so I can tell it’s running the latest version.

Is there any magic voodoo I can do to stop this as it’s a tad annoying even when tinkering with something small.

Thanks

I have just tried reloading the level, and also recompiling, and compiling only using the compile button in the editor. Still not running the latest build.

I think I may have isolated my problem. My experimentation is with sockets and threads, it would seem that the threads I am creating and using the FTcpListener class are hanging around after the application is stopped (still running in the editor). As such I imagine it’s not possible for the Hot Reload to relink to the new DLLs due to currently active calls to the older DLLs.

Once I have untangled my mess and confirmed that hot-reload is working for me I will update this answer.

edit : After untangling the mess I had made with threads my project is now hot-loading happily. I had several threads knocking about that were not being stopped at the end of play, so they were living on in the Editor. This prevented the hot link from using the new code as well as undesired behaviour.

If anyone else is finding that hotlink is constantly using the previous version of code, might be worth checking that there isn’t some thread or something isn’t hanging about.