Lobby

Scene: Lobby/Lobby

The Lobby hosts and joins games through Unity Multiplayer Services, with Relay, so players can connect over the internet without opening ports. The project must be linked to Unity Cloud (see Getting Started).

🎮 Using It

  • Type a player name.
  • Press Host Duck Shooter or Host Blueprint to create a session. The host loads the game, and joining players follow.
  • The Games list shows the open sessions with their player count. Press Refresh to update it, and click a game to join it.

📁 Example Scripts

ScriptRole
SessionLobbySigns in anonymously, hosts, joins and leaves a session, then loads the game scene on the host. It sits next to the NetworkManager
SessionListLists the open sessions as buttons and joins the one clicked. Full and locked games are hidden
SessionLobby fieldDescription
Max PlayersMost players in one session, host included
Game SceneScene the host loads after creating the session. Set by the host buttons
On Joined / On Left / On StatusEvents for the UI: joined, left and progress or error messages

The NetworkManager uses LobbyNetworkPrefabs, the list of every network prefab in both games.