I can't modify the Default Pawn Class in Project Settings -> Maps & Models


As you can se, the “Game Mode seleccionado” (Selected Game Mode) options are locked idk why, and I need to change the Default Pawn Class to my own class, what can I do to solve this?

Hi,

My first question is: The default game mode, MiGameMode, is that a custom game mode class that you created, or is that the default game mode provided by the engine?

Inside of GameModeBase.cpp there is the following code:

AGameModeBase::AGameModeBase(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer.DoNotCreateDefaultSubobject(TEXT("Sprite")))
{
	bNetLoadOnClient = false;
	bPauseable = true;
	bStartPlayersAsSpectators = false;

	DefaultPawnClass = ADefaultPawn::StaticClass();
	PlayerControllerClass = APlayerController::StaticClass();
	PlayerStateClass = APlayerState::StaticClass();
	GameStateClass = AGameStateBase::StaticClass();
	HUDClass = AHUD::StaticClass();
	GameSessionClass = AGameSession::StaticClass();
	SpectatorClass = ASpectatorPawn::StaticClass();
	ReplaySpectatorPlayerControllerClass = APlayerController::StaticClass();
	ServerStatReplicatorClass = AServerStatReplicator::StaticClass();
}

It is this code that sets those parameters, and doesn’t allow you to change them in the project settings. What you will need to do is create a Blueprint based off of your custom Game Mode class, and use that BP in the project settings. From there, you should be able to customize those parameters.

I hope this helps, and good luck :slight_smile:

1 Like

Thanks man, but the solution was easier than i expected, I just had to click on the arrow next to the name to apply the change, when I did that i was able to modify anything, my bad I’m new on UE

Hey man, I’m having the same problem, can you specify which arrow did you click on?