How to switch between 2 or more players (turn based hotseat)

I’m not talking about standard multiplayer but about multiple users playing on the same device. For an example, one user ends with the turn, presses “end turn” and another player starts playing.

Any suggestions, ideas or tutorials?

I guess I could create a variable having Player1 as a default value. And when player1 hits “end turn”, var value changes to Player2 and so on.

The rest of game logic can check what is the current var value and proceed with everything according to that.