[URGENT] Compiling C++ breaks blueprints and Unreal requires restart to apply compiled changes !!!


I am new to Unreal Engine and it is already driving me insane, with very simple stuff.

I have created the default Third Person project (C++ base).
Hit play, everything runs fine!
I open up the default character class and just change the name of a default subobject

Let’s say I change the TEXT(“CameraBoom”) to TEXT(“CameraBoomBoom”)

Save code (cntrl+s)-> Go to unreal and click Compile -> Compiles OK.

Click Play -> Camera Movement is broken and the name of the component is NOT changed!

Re-open project -> Camera Movement works fine -> name is updated to “CameraBoomBoom”(only in ‘World Outliner’ hierarchy, not in the blueprint that inherits from the C++ class)

Alright, it works, but I can no longer interact with the “CameraBoom” object, the BluePrint itself is JUST broken !!!
It is missing all the things on the right of the blueprint menu and I can not use the transform handle to move the CameraBoom component

Okay, weird, maybe the name breaks it? Alright, change it back to “CameraBoom” -> Recompile from within Unreal -> save everything -> even click recompile and save on the blueprint itself -> reload the project!

Well, it works, but the blueprint REMAINS broken!! I just can not move that component anymore or interact with it !!! The only way to fix it is to just make a NEW project. I tried to rebuild from VS, Unreal, Save and recompile blueprints, reload projects, reload visual studio. NOTHING HELPS, it just remains broken.

This is really overwhelming and makes no sense at ALL!
Can somebody help me with this and point out what could be wrong? I am trying to solve this for a long time, and I can not imagine myself working in this kind of environment if I have to restart the whole project on each recompile. And even if I revert a code change that broke something to its original state, it will remain broken.

Nah compiling breaks anything currently running using the DLLS you just over-wrote and it will crash. Hot-reload doesn’t seem to work so good either.

Go into prefs and turn on Live Coding. You’ll have to build by hitting Alt-Control F12 if UE is open (if you try using VS building will fail) but that will rebuild your code. It also includes a fast-restart button for if you change anything structural. So if you change class, struct or enum structure in your codebase, you will need to rebuild and do a quick restart.

Thanks for the answer. For now what I found out to work is , just save project , close down unreal, rebuild from vs ( starts automatically unreal if compiling is successful ) and it works like butter. It is just a bit annoying that you have to restart the whole project, but for now it is bearable and you get used to it eventually.

FYI that “starts automatically” is Unreal running in the debugger. That WILL be slower to run than without the debugger. If you didn’t intend this, just “build” rather than “build and run” and load your project manually.

Thanks for making it clear, for now, it is relatively quick and it just loads the project immediately, so I do not have to do the extra clicks. If compiling starts to slow down I will consider just building and then launch the project manually.

Do you have any clue if EPIC is going to fix this issue with the Hot reload/compile? Because it can easily cause a huge mess in a project.
I really like how Unity 3D handles it. You just save your code, it reloads and boom, everything updated(Even if your code is set up properly, you can do that while the engine is simulating your scene). But my guess is because Unreal uses C++ and the build architecture is a whole lot different.

We hope they will, but I’d rather see Live Coding support class structure changes. With its quick restart button it kind of does though.

Try Live Coding instead of what you’re doing now.