Following my recent question about unreal crashing when using static ConstructorHelpers::FObjectFinder, I’ve discovered a new issue with all my C++ projects.
As a beginner in Unreal Engine, I’ve started learning from the dev community and documentation site.
Right now I’m doing C++ Programming Tutorial and done the following tutorial so far (using UE5.1.1 on Windows10 without source control):
Game-Controllerd Cameras
Components and Collision
Programming Quick Start
Player-Controlled Cameras
Except the Components and Collision tutorial, I didn’t have any issue while doing the tutorial.
However I found out that everytime I open those C++ project, all my classes doesn’t appear in the content browser and class instances that I put in the level disappeared.
I always have to compile (using Live Coding) for my classes to reappear in the content browser (instances in my level doesn’t reappear though).
For all my classes that I’ve added code to the constructor (CreateDefaultSuboject<>), in the message log, I have the following message for each object I’ve created:
CreateExport: Failed to load Outer for resource…
Could you please tell me what’s happening?
I’ve done some research and found similar unresolved post:
LiveCoding sometimes does that. shut down Unreal and your project, load it from Visual Studio and build it from there, then run it - that often fixes things.
Hello
Thank you very much for your reply.
Closing Unreal, open the visual studio solution, build and run (Local Windows Debugger) did the trick.
Thank you very much for your help.
I understand now why in the “C++ for blueprinters” tutorial, the author was always restarting Unreal Engine after editing C++ class.
I am using UE5.5 and I have same problem that each time I open my UE project there is no C++ Classes directory and no C++ classes are displayed, but if I hit the hot reload button it does show up. I did try to close the editor and rebuilt the entire solution from Visual Studio, didn’t help. I don’t understand why, the only thing I found online is that I should build from VS but it doesn’t seem to help anyhow.
I figured this out! I found out that I was using the wrong build configuration. I switched to Development in VS, built and it all worked:) Only after that I looked into project preferences in UE Editor and found out there was a dropdown to change the build configuration. Apparently if the one set in UE and the one set in VS are different they are incompatible, which makes sense but is very much not obvious. So now when I open the Editor the C++ files are there and no issues whatsoever:)