This type of error likely occurs when a blueprint is loaded from C++ via FClassFinder, like this:
AMyThirdPersonGameMode::AMyThirdPersonGameMode()
{
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter"));
if (PlayerPawnBPClass.Class != NULL)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
}
…or other ways a blueprint gets loaded very early in engine startup. In C++ put a breakpoint on the blueprint’s native class to find out why it’s being loaded.
When you use FClassFinder to load a blueprint, that means that the moment this code module is loaded that blueprint asset will also be loaded. For a class in the main project’s module that’s often the Default phase. If that blueprint depends on any plugins that are also loaded in the Default phase or later, it will be missing classes that it needs to load correctly.
You can either change the dependency plugin to PreDefault, or much better: don’t use FClassFinder to find BP classes in C++. Just create a derived BP to reference another class, or have a FSoftClassPtr in a DeveloperSettings that’s loaded later.