I have a C++ class that derives from AGameMode, and a BP class that derives from that custom C++ game mode class. In the project I have set the BP game mode class as game mode to use. Everything works fine, except in one case.
When I call the following line in the constructor of the C++ class:
static ConstructorHelpers::FObjectFinder<UBlueprint> Blueprint(TEXT("Blueprint'...'"));
// "Blueprint'...'" is a valid path to an existing BP asset, ref. copied from editor
then compilation in Visual Studio 2015 works fine. However, after building the solution and restarting the UE4 editor, the UE4 startup splash screen shows up, but freezes at exactly 72% (every time). This happens also in a fresh project, can be reproduced every time. I am using official UE4.12.5.
This seems to be a bug. Or is it a feature?
How else is one supposed to get a UClass* reference to a BP class from within a C++ game mode class?