Unreal Engine 5 - C++ Classes disappear after exiting the editor

Viewed 927

Whenever I exit the Unreal Engine 5 editor, I've noticed that when I open it up again, my various C++ classes disappear.

Fortunately, all I have to do is re-compile and they will be added back in again. However, it does become a serious inconvenience since I will have to re-attach it to any actors it was a component of and I have to re-do any Detail panel edits I did.

Let's say I'm trying to make a series of moving platforms move for my parkour game, so I make an ActorComponent called PlatformMover. I attach it to different platforms with their own velocities and directions. I then exit the Editor for the day and when I re-open it the next day, PlatformMover is gone. I then re-compile my project and PlatformMover is back, but I now have to re-attach it and re-configure it for every platform again.

It's really inconvenient, so is there any fix for this?

1 Answers

I managed to find out that this is a rather common bug with live coding. Fortunately, the Unreal Engine course I've been taking actually has a video earlier in the course catalog that deals with this, and I can report that the solution provided worked for me.

  1. Close the editor immediately but leave the IDE open.
  2. Build the code with [Project Name]Editor Win64 Development Build. (Emphasis on the "Editor" part at the end. I thought this didn't work until I realized that I was actually using "[Project Name] Win64" instead of "[ProjectName]Editor Win64"
  3. Open the project again.
Related