Upd1
I’ve found closest place where I could put some code to fix it. But It would be greate to get answer whrethe it has to work without it…
I’ve figured out that my blueprint start to init during start up when I init my custom Game Mode. Namely, I used this code in constructor of my GameMode class
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/Characters/MyCharacter_BP"));
if (PlayerPawnBPClass.Class != NULL)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
I replaced it with this
if (GetWorld() && GetWorld()->WorldType)
{
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/Characters/MyCharacter_BP"));
if (PlayerPawnBPClass.Class != NULL)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
}
else
{
DefaultPawnClass = AMyCharacter::StaticClass();
}