Packaged Game has asset with missing load flags

I’ve been trying to package my game for Windows 64bit. It works perfectly fine in editor and packages with 0 errors across the board according to the logs. The game starts just fine, but when I hit the start button on the Main Menu level to load the actual level, the game crashes. The error reported is that a TargetWaypoint which is part of a class “is found in memory and is an export but does not have all load flags”.
I’ve hunted around and the same problem arises again and again with other classes too if I remove instances of the offending class. The only thing they have in common is that they have ChildActors that either contain a TargetPoint, or another class that contains a TargetPoint. They also all create these in C++. I’ve never seen or worked with Load Flags before, so I can’t make heads nor tails of this. The same problem occurs when I set the default level to the gameplay map and package the game with that, essentially starting into the level directly.

I’ve already tried setting Cook Everything, Full Rebuild and For Distribution, but to no avail. Just to make sure, I’ve also added the folder with the BP that seems to create the problem, but that didn’t help either. There really seems to be a fundametal problem with the flags on these target points. Hopefully, somebody has already ancountered this and can help me out here.

Hey I had same issue and after a few hours of messing around I found a solution. Your call to SetChildActorClass() ; cannot be inside the constructor. Putting it inside PostInitializeCompenents() fixed it it for me. Why i dont know. Note you cant put it in PostInitProperties or anywhere earlier, only PostInitializeCompenents() or probably begin play as well.

1 Like

It’s PostInitializeComponents not PostInitializeCompenents