Default Pawn Class doesn't change

I’m new to UE4. So, I have a default Pawn (SandboxPawn) and GameMode (in which constructor I have a DefaultPawnClass = ASandboxPawn::StaticClass(); line). It compiles fine, but in the editor DefaultPawnClass is “Default Pawn”. Also, I’ve done some googling before typing this, so in the settings as the Default GameMode I have TestProjectGameMode.

If you need any other information feel free to ask. Thanks

In your GameMode C++ header file mark DefaultPawnClass variable with UPROPERTY(EditAnywhere), actually this should already be the case as it comes from the parent class I assume?

In the editor under C++ classes folder you will have your GameModeC++ class, here you right click and create a blueprint class based on your C++ class.

You can now open the blueprint and change the default pawn field to your custom pawn, then in project settings → maps & modes set the gamemode the Blueprint you just created and see in the default pawn field if it is also your SandboxPawn.