Compiled C++ code isn't hot reloaded

I recently updated to 4.23 and am running into a very annoying issue when using C++. Basically, (seemingly randomly) whenever I make a change to C++ code, press compile in UE4, and then press play, my code changes are not hot reloaded even though it compiles successfully. This probably happens about 25% of the time I compile. I can tell that it happens because if I place a breakpoint in C++ it will show as white if it wasn’t loaded.

Even worse, after about an hour or so of this, Unreal gives up completely on loading any new changes and none of my C++ breakpoints get hit, even though they appear to be loaded. The only way I can fix this is to restart the engine.

Is anyone else having these types of problems? I noticed these same problems back in 4.22 but they were very rare and didn’t bother me much. Any suggestions would be appreciated. I’m running VS2019, DebugGame Editor, Win64.

Yes it also happens to me, so now I always build with VS, except for very small changes. Building from VS always fixes it.
Im very new to UE c++ so I don’t know if it also happened in earlier versions. I read everywhere that HotReload was broken so it didn’t surprise me :stuck_out_tongue:

I believe you’re suppose to just be able to press the Compile button from within Unreal and not have to compile through visual studio, at least that’s the way it used to work. That functionality seems to be more and more broken with each release of Unreal…

hot compile? it it “live code++ build”? I prefer to use Debelop Tools → Modules, reload. UE4 new build “live code++ i” s not very useful.

What? I don’t understand what you’re trying to say.

290401-233444.png

it is hot reloaded ?

I’m bumping this because it’s getting really annoying here. If it crashed it would be better, but the fact that it compiles successfuly but fails silently is a real hassle. It happened A LOT to me today -_-

Yes, this issue is very annoying. Hoping someone from Epic sees this. I will create a bug report if no one replies with a solution soon.

Oh I see what you mean now. Okay, I’ll give that try for a bit and see if it works any better. I’ll update this post once I know if it helps me or not. Thanks.

UE4 Hot Compile has bug, sometimes it does not work. so I do not like hot compile, I prefer use the “Debelop Tools → Modules”, the “modules” tools has the same effect

Nice ill give it a try tomorrow.
Also I just realized there is a drop down arrow next to the compile button, which leads to some settings, mainly “Enable Live Coding”. I didn’t know about that.

link text

I will also try it tomorrow because I’m going to bed right now.

And thanks 带帶大师兄 :wink:

Okay so just to sum this up for anyone else who comes along, 带帶大师兄 's solution seems like a good workaround. Instead of using the Compile button at the top, go to Windows → Developer Tools → Modules and find the module with the same name as your project, in my case, Procedural and press the compile button next to it. I would suggest docking the Modules window somewhere convenient like this:

This seems to always hot reload the C++ code correctly. Thanks 带帶大师兄!

Yeah, this seems to work. See my summary at the bottom. Thanks!

I played around with that checkbox but couldn’t find any difference in behavior with it checked vs unchecked lol.