Why does sometimes you have to compile twice?

Sometimes, you click compile, wait for the compilation… Play the game and your changes are not there? So you exit the game, click compile again. And now the changes are there. Why did I have to compile twice?

This doesn’t happen every time, but it happens often enough that it’s very frustrating.

Why does this happen? Is this problem so hard to track that it hasn’t been fixed in several different UE4 versions because we just don’t know what causes it? Or is it just very low priority? Is there anything on our end we can do to avoid it?

That’s why I use hot reloading. It works well as long as I don’t do something incredibly stupid in my code and U macros save it and wreck the whole feature in the process. When that happens I close the engine and build the project in visual studio alone - that clears the mess up and I can use hot reload again. I use the compile button only when I want some more detailed error logs.

I always advise against hot reloading. It can cause more issues than its worth. Livecoding is ok as long as you follow its rules and exclusions. I have seen too many people with corrupted blueprints due to hotreload.

I don’t recommend hot reloading at all. It’s too buggy. Live reload and having a good PC to restart the editor is the option for C++ development.