How do I change Default pawn and keep it for a new level?

So I have a custom player controller to set my defaults pawn, and having a Game instance to store my default pawn (uses pawn class var), When game starts I cast to the instance and get the desired pawn but when I get that to set it for my Gamemode’s default pawn, It’s not setting it, The blueprint in the image that I attached, is not failing but do nothing? So how do I change my default pawn in my custom gamemode and store it for future levels?!

Is it a Multiplayer game by any chance?
And how do you test if it is set to yours or not?
Is CharSelected a Pawn actor, or child class of it?

Not really answers you questions, but alternatively you can make a new variable “DefaultPawn2” in your GameMode and use that to spawn your pawns accordingly.

I just want to have button to control what I will spawn as by my default pawn, is this possible with blueprints?

Most probably, but this doesn’t really answers my questions. Is it an online project, or only one player? do you know that you couldn’t set the pawn?

it’s not! but maybe in the future?!,
So when I press a button, I cast to game instance and change player pawn class, shouldn’t that store it?
Because in my player controller I cast to my game instance and get the pawn class, then I cast to my game mode and set the default pawn class,
Is there a better way?
sry for not answering you in the first place! :confused: thanks tho!

Could you zip up the project, and upload it here, so I could take a look at it?

sry I can’t just zip it up, but do you not understanding me?
In my game instance I just create a pawn class variable reference,
In player controller I have an event begin play,
I cast to my game instance and after that cast to my custom game mode BP, and set default pawn in my custom game mode from the game instance cast,
When I press the menu button I cast to my game instance and set the pawn class variable, should I sen you picks on what I have done or do you understand? :smiley:

I understand, you want to press a button, and change the defaultpawn class to something else. But I don’t understand how do you know if this variable setting happens or not? Your current pawn won’t change because of it. Do you make a respawn? Do you make a print string? I don’t see the bigger picture, that HOW do you know it didn’t change, and what are you trying to achive by changing the defaultPawn mid-game. So yes, pictures, and more new details would be great. Or just reproduce the issue in a clear project and send me that, or I don’t know. Any new information that you got :smiley:

I just found the problem! it’s not setting the default pawn class in the world setting so the level don’t know what to do but the game mode knows what to spawn with, the world settings appears to set the default pawn class after what I had set it to in my custom game mode (manually). so when I go in to the blueprint and the set the game mode it works,

AAAaaaa! You can’t set the default-default pawn from the game. All this set does is change the DefaultPawn until the end of the level. when you restart the game it changes back to the real default one.