Plugin Character Base Class Load in Game Mode As Default Pawn

Hello, I have a character class in a plugin and use it as parentclass for blueprint, i want to load the blueprint as
default pawn in gamemode but the constructor seems to be to early.

	//static ConstructorHelpers::FClassFinder<APawn> PlayerPawnObject(TEXT("/Game/CustomeCharacter"));
	//if (PlayerPawnObject.Class != NULL)
	//	DefaultPawnClass = PlayerPawnObject.Class;

This only works if i uncomment it when engine is running and hit compile script.
How i can load it later?


There is a loading phase in the .uplugin that you could change. Personally though I’d just make a blueprint of the Game Mode, assign it there, and use that instead. Never really approved of the hard-coded paths, if you move something you have to manually update all the references again.