Lobby System
A Lobby System is a way to support multiple players, playing in different groups of players when connected to the same server.
The Lobby System works only on Relay mode, the reason is that in other modes ( Embedded and Authoritative ) the system shall always handle and send information from all players to all players.
In short, by default Relay mode is the only mode that supports the possibility to create Lobbies, this option possibility to use the same server to run multiple players one separated from each other.
The following drawing illustrates how Lobbies isolates the group of players, on this scope players will only see events from their groups, instead of seeing all events of Relay Server.
In this scenario, Player1 and Player2 will see only events that came from Lobby1, and Player3 and Player4 will see only events that came from Lobby2.
This option is pretty useful if your game has a small number of players for each match and there's no memory or computation difference from having the same number of players with or without lobbies.
You can Enable Lobby support by checking the option on NetworkManager.
When Lobby support is enabled, a lobby must be created before the player enters on any match, this means that the player has the option to create a new lobby or enter into an existing one.
ObjectNet container is an example scene called "XX - Lobbies" which has a clear implementation illustrating how to include lobby support in your own game.
To create a Lobby, fill in the lobby name and press "Create Lobby", this will create a lobby and spawn a player into this new lobby.
When a player enters a server with existing lobbies, he needs to press "Refresh Lobbies" and a list of existent lobbies shall appear with the option to "Join".