Download

No player character in game outside editor

Hi! I added player character to game and I can play with it in editor. When I try to play outside the editor, in packaged project or compiled in visual studio, I don’t have my player in game. I’m just flying around with camera. What could I do wrong? Here’s my gamemode constructor:


static ConstructorHelpers::FObjectFinder<UClass> PlayerPawnBPClass(TEXT("Class'/Game/Blueprints/MyPlayer.MyPlayer_C'"));
if(PlayerPawnBPClass.Object != NULL)
{
	DefaultPawnClass = PlayerPawnBPClass.Object;
}

Did you set your GameMode as the global default (in the Project Settings) or for the map (under World Settings)? Are you getting any warnings in the log?

It works! I set my GameMode as global default but not for map. Setting map’s GameMode to proper GameMode fixes the problem.
Thanks for help.