Using None as DefaultPawnClass in C++

I’d like to do like in BluePrint when I create a GameMode to set the DefaultPawnClass to None but setting it to NULL crashes UE4. I also tried overriding functions for the same questions asked a few years ago but all the answers seem to be outdated.

You can’t set DefaultPawnClass to NULL. If you want to set it to a “null” pawn, you can set it to ADefaultPawn::StaticClass() as you can see in GameModeBase.cpp, otherwise you can create your custom Pawn class if you need something different.