Local Co-op
Built-in solution
Users can press the join button on a Device. If the Input Manager allows more players then it will call the functions to Spawn a Player and bind it to that Device. For example if you press spacebar then a new Player will be created and connected to that Device for inputs. If you press a gamepad join button then another unique Player would be created and connected to that Device.
When a Player is created then it will try to spawn an Avatar immediately by default. The Player will push inputs information to this Avatar Object. Players and Avatars are completely different things. You can destroy an Avatar and still have the Player in the game.
The default avatar is defined in the GameSettings DataEntity in Vault Dashboard. You can change it at any time. This is what every Player will spawn as their Avatar by default.
Control Max Players by changing the PlayerInputManager property Max Player Count to what you need.
Avatar Customization
You can customize the Avatar for each player, but in most cases this is going to depend greatly on your game scope and requirements so we do not provide any UI or options for choosing a unique Avatar, only the default. For example are you saving the character preferences to Disk/Cloud/Services and loading them when the Player joins? That's a unique problem you are expected to solve by modifying how the Player Avatars are spawned, and any further customization we add would just get in your way.
Respawning
The built in solution respawns avatars at the default Spawn point. If you need a different solution then you can extend the spawning system to behave in a matter that suits your project.
Camera
Cinemachine will track your Player Avatars, but no contingencies are in place to stop them from going off the screen at this time. Future scope includes solving this problem and having a more robust camera containment system with proper parameterized controls.
Last updated
Was this helpful?