C++ files disappear from UE interface / scene


I’m using UE5 Preview with Visual Studio 2022, so maybe that’s the problem, although I’m not 100% sure.

So I can create and edit C++ files and I can save the project without any problem.
I closed UE, and 5 minutes later I opened it again. Everything’s still there, but the C++ files are gone. They are not added to my actors, and they don’t appear in the hierarchy in the UE interface, HOWEVER I can still see them outside of the engine. (e.g. see image attached)
I didn’t mess around with the files outside of the engine, and I’m 100% sure that I saved everything, as I experimented with this issue for a bit, but I have no idea why my files disappear from the UE interface.
I tried refreshing the visual studio project, but no luck.

The strange thing is, when I open Visual Studio from UE (Tools->Open visual studio 2022), my files are there. I can even compile them, and after compiling, they reappear in the hierarchy inside UE.
But recompiling doesn’t add them back onto my Actors, which is the main issue here.

Any ideas would be highly appreciated!


Also, something else to watch out for is… Create a folder in the content browser. Close UE. Come back, and your folder will be gone… Happen to me a couple times. Solution is to create something like a junk/dummy blueprint… Just something that will be there.

Good luck, hope you find a solution, I’d like to see it myself.

I just found the solution, which is to disable “live coding” (edit → editor preferences → live coding).
After disabling it, compiling the code, everything stays where it should even after closing and reopening UE.

This is a shame, as it was so comfortable just to press ctrl alt f11 to compile quickly, hopefully this’ll get fixed soon.

This solution is wrong. Live Coding does not produce actual executable DLL files, it produces patches. Patches are meant to serve as temporary alterations to the running code. They do not replace or serve as actual DLLs.

Always build and run UE from your IDE, as a coder you should never be opening it any other way.

Change your mindset on how you use Live Coding: it is for testing minor code iteration changes and other minor testing work. Close your editor and build real DLLs whenever doing major architectural changes or whenever Live Coding doesn’t seem to be working right. The near 100% robust workflow is to close the editor any time you edit headers or constructors, and use Live Coding only for changing function implementations in .cpp files.

1 Like

I got this issue too. It’s annoying!

Thank you!
Another hour wasted for things that should work out-of-the-box.
Progressing with UE5 is the worst experience in the last 10 years.

1 Like

Hey Homer, this was very informative for me. As a new UE user I’m trying to get an understanding of the correct UE5 workflow.

That in mind, would you mind elaborating on “Always build and run UE from your IDE”. Are you specifically talking about launching UE from an IDE integrated terminal, or something else? Assuming the former, why is this preferred over loading UE from the Epic launcher?


IDE means Visual Studio or Rider - if you’re a coder working in C++ on a C++ project, you always build the game project and run it using your IDE. After that once you’re in the editor you can use live coding for little changes to most class methods. Whenever you decide to change the layout of a class or add/change any function signatures, that’s a major architectural change and you have to close unreal and then build+run from your IDE again


Its cool and not a problem while ur whole team are programmers. But what to do when some of them are artists, level designers etc? It seems so unreasonable to force them to open UE from IDE too. But it can potentially break the branch they’re working on with NULL parents in blueprints. Isn’t it?

Artists etc. need to be given the built DLLs somehow.

If you’re a small team with a single coder, you might simply share them manually somehow (if you’re using perforce there are some easy solutions, if you’re using git maybe not, I’m not sure).

If you have multiple coders, you set up an automated build system (continuous integration) to produce and provide the DLLs for non-coding team members, and coders don’t worry about DLLs any more, they ‘just’ have to continuously submit working code.

Disabling live coding also solved my problem, after going in circles for hours and resetting and deleting things until the project was half-destroyed. I don’t know the consequences of that, but clearly both Unreal and Rider behave a lot more normally with this disabled.