How to change Default pawn class in my Game Mode via blueprint?

Hi guys,

I am able to change Default Pawn class in GameMode under World Settings manually.

Is it possible to achieve the same via blueprint on pressing a key.

Hi, is this what you’re looking for?

68090-setclass.jpg

Thanks Alder,

I had tried this earlier but it didnt work.
Any reason why?
By the way I was trying in level blueprint. Am I missing something.

Thank you so much for your help. Really appreciate it

I asked this same question back in the day which led me down a long path of forced learning stuffs.
Anyway, I don’t know if that BP node was avail back in 4.4 or why its not working for you, but the question is why are you trying to change your default pawn class from BP?

Are you trying some kind of a character switch? or Char select screen?

I set default pawn class to NONE then use PlayerStart drops for spawn points in the map with tags.
Long story short, spawn an actor, then possess the spawned actor on begin play in the Characters blueprint, or wherever. good luck.

Can check this thread out for more info on that:

I’m trying to do this as well. Anyone else have a solution?

Best place to change that value is in the construct event of that gamemode, but needs a level reload.
Set a value in the GameInstance before you loaded the level plus past that value to the SETDefaultPawnClass in the GameMode construct event. Then the level should loaded with value selected in GameInstance.

2 Likes