Why do I need to delete project binaries to see .cpp and .h changes?

Hey all, I’m brand new to Unreal after a few years with Unity and I think I’m missing something here.

Whenever I reopen a project, any changes to .cpp or .h files are not present. This includes new files that no longer appear in the engine (though I can see them present on disk), as well as any new code in existing files not appearing in the details panel and not running in the game.

My workflow is this:

  1. Open project (new or existing)
  2. Do .cpp and/or .h edits in files via VSCode
  3. Save changes in IDE
  4. Recompile via live coding button
  5. Carry on no problem.
  6. Close project for the day:
  7. Close engine
  8. Build in the IDE
  9. Open project: No changes apparent.

I can hit the live coding recompile button again to show changes, but any values in the details panel are lost and set to defaults.

If I delete the binaries folder in the root project folder before I reopen the project (step 9), then there is no problem. All .h and .cpp files, as well as the edited values in the details panel, appear as they did when I last closed out of the project.

I feel like deleting the binaries folder evrey time is probably not the intended workflow here, but I’ve reproduced this on 3 new projects and it’s the same every time.

Any tips out there?

1 Like

Maybe I’m too picky, but I hate live coding, it can cause so many problems that every time I tried to use it I ended up disabling it again. I always build from the IDE (with live coding disabled) or with the compile button and then restart the editor (I made a free plugin just for that and considering it has more than 50k download I guess I’m not the only one who uses this approach).
C++ Classes disappearing from folders are a common issue with UE5 and live coding, sometimes blueprint variables/components/functions don’t update with hot-reload, it’s the first thing I disable when I download a new editor version :sweat_smile:

Also, I don’t recommend using VSCode with Unreal (and with C++ in general).
Don’t get me wrong, I love it, but it’s really not ideal for several reasons (Especially if you use the debugger and breakpoints like I do), the major downside was the intellisense speed (it was slower than copilot, and sometimes it wasn’t even working)

1 Like