How to spawn different pawns per players per level?

Im developing a 2 player coop puzzle game. I have multiple pawns with different abilities, and I need to define which Pawn class Player 1 uses and which Pawn class Player 2 uses for each specific level.
For example:

In Level 1:

  • Player 1 uses PawnA
  • Player 2 uses PawnB

In Level 2:

  • Player 1 uses PawnC
  • Player 2 uses PawnA

I need some type of system to assign in a details panel or an editable variable per level. I thought of a Data Asset with 2 Pawn class references but I dont know where to place this. Maybe in the Level Blueprint? or is there a way to expose variables in the world settings of each level like the gamemode override variable?

You can extend your game mode to have additional map variable where you set what pawns you would want for each level. Override GetDefaultPwanClassForController() to pick from your variable and you are ready.

If you want even more flexibility you can add a custom actor with a list in your level blueprint and tell your Game Mode to try get this actor and read the pawns from its list.