- Home /
Player input manager - Scene switching
Context
I have a different scene for my main menu and different levels in my game, I want to create a (for now) local co-op game using the Player Input Manager of Unity. When you enter the game you get to the main menu scene with the screen to hit any button to start, when you press a button the Player Input Manager creates a first player which can navigate to the menu when the player presses to start the game it will enter a lobby where 3 other players can join and everyone can select their character.
Now when everyone is ready I switch scenes to the first level and of course all the players are gone and can join again by pressing a button but I would like to retain the once made in the lobby
Question
How do I retain the player with their chosen character?
Would I have to set the player game objects to not destroy on scene switch and the player input manager? But I read Unity advises against using the doNotDestory method.
What is a better way I can switch scenes and spawn in the number of players with their chosen model and assign then the right controller?