UE 5.0.3 My C++ Components won't save on my Actors

Hi all, newbie to Unreal here.

I’ve created a couple of my own custom C++ Component and I’ve added them to the list of components on Actors in my project.

Unfortunately, whenever I restart Unreal Engine, all components that are my custom C++ classes seem to disappear from my Actors, and any nodes in my Blueprints for that Actor are rendered invalid as a result.

If I try to re-add the missing components back via the “Add” button, they don’t even appear in the list of options/search, until I click the Live Coding button to “Re-compile and reload C++ code for game systems on the fly” in the bottom-right corner.

I’ve tried to rebuild the project from my terminal whilst Unreal is closed, as recommended on some other threads I found, but that doesn’t seem to have any impact.

This is pretty frustrating, not sure if I’m doing something wrong if this is a bug, would appreciate any tips. Thanks

2 Likes

Live Coding compiles temporary dlls. To have new code affect the project permanently, you need to build it with the engine closed.

As you said you’ve done it already, I guess you might be building a different configuration than Development Editor | Win64 (assuming you’re on Windows).

When you open a project by launching it via the launcher or by double clicking its .uproject file, that’s the configuration it tries to load, so that’s what you need built. If you can open the project on Rider or VS, make sure that’s the active configuration and build.

6 Likes

Thanks! I was building Development | Win64 instead of Development Editor | Win64, didn’t even notice this before as there are so many options.

4 Likes