Now I’m following the Components and Collision tutorial using UE5.1.1.
I’ve done the first part and when I build the script with Live Coding, Unreal Crash at the following line:
My project does have the StarterContent, I’ve tried to change Shape_Sphere.Shape_Sphere to Shape_Cube.Shape_Cube like the QuickStart tutorial but still crash. Commenting this part of the code, I’m able to compile and have not issue with static ConstructorHelpers::FObjectFinder.
One thing to note is that when I copy Shape_Sphere to /Content/Props folder for example, crash doesn’t occur with the following line:
Make absolutely sure that your path is correct. Browse to the object you want to construct in the editor, right click and click “copy path” or whatever it’s called, and make sure you’re using the right path.
Also, when you crash, Unreal Engine should give you a crash dialog. It would be very helpful if you post whatever it says here as well.
Not sure what’s going on but yesterday, I was able to compile, drag my pawn to the level and test it.
This morning when I loaded my project, I had the following error in the message log:
CreateExport: Failed to load Outer for resource ‘RootComponent’: CollidingPawn /Game/Maps/HowTo_Components.HowTo_Components:PersistentLevel.CollidingPawn_1
and my class didn’t show up in the content browser. I try to recompile without editing the script and crash occurred.
I’ve tried to change to path by right clicking of the asset, chose “copy reference” and paste it.
Now my FObjectFinder looks like below:
with this change I was able to compile and put the pawn in the level and test it.
However when I close the project and reopen it, I got the same CreateExport : failed to load Outer… log and when I try to compile, it crashes again.
I don’t know if it is important but when creating my class, I made it public, so my header is in ~/Public folder and my CPP is in the ~/private folder
I’m attaching my header/CPP file, the content of the crash reporter, CrashContext.runtime-xml, the crash log and dmp file.
Hoping to find the issue.
It seams that the issue is related to Live Coding.
Closing Unreal, open the visual studio solution, build and running from Visual Studio fixed the issue.