Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Multiplayer Menu
  4. Default Network Lobby Manager

Default Network Lobby Manager

Only fields in the default Network Lobby Manager that are relevant to our needs are explained here.

The rest of the fields of the Network Lobby Manager are discussed in Unity’s manual.


  1. Dont Destroy On Load: Make sure it’s set to true.
  2. Run In Background: Make sure it’s set to true.
  3. Lobby Scene: Drag and drop the scene that contains the Multiplayer Menu in this field.
  4. Show Lobby GUI: Make sure it’s set to false.
  5. Max Players Per Connection: Must be 1.
  6. Minimum Players: Must be 2 or more.
  7. Lobby Player Prefab: This object holds the player’s faction information when he is in the lobby. It is spawned when the player connects to a lobby. A prefab of this object can be found in the project tab: RTS Engine -> Multiplayer -> Prefabs -> UNET under the name of “LobbyPlayer_UNET”. The prefab has the MFactionLobby_UNET component which inherited from the NetworkLobbyPlayer component and UI objects as child objects. In addition it has the “Network Identity” component with “Local Player Authority” set to true. 
    1. Color Img: A UI Button that is used to display the faction’s color. In the “On Click” event of the “Button” component, drag and drop the “LobbyPlayer_UNET” object as the event source and set the event to MFactionLobby_UNET -> “OnFactionColorChange”.
    2. Faction Name Input: A UI Inputfield that is used to input and show the faction’s name. In the “On End Edit” event of the “InputField” component, drag and drop the “LobbyPlayer_UNET” object as the event source and set the event to MFactionLobby_UNET -> “OnFactionNameChange”.
    3. Ready To Begin Button: A UI Button that is used to announce that the player is ready or not ready to start the game. The player joins the lobby as not ready. In the “On Click” event of the “Button” component, drag and drop the” LobbyPlayer_UNET” object as the event source and set the event to MFactionLobby_UNET -> “ToggleReadyStatus”.
    4. Ready Image: A UI Image that is shown when the player is ready and hidden when he’s not.
    5. Kick Button: A UI Button that is only shown for the host and allows him to kick players from the lobby. In the “On Click” event of the “Button” component, drag and drop the “LobbyPlayer_UNET” object as the event source and set the event to MFactionLobby_UNET -> “CallCmdKickPlayer”.
  8. Game Player Prefab: A simple empty object prefab that has the “MFactionManager_UNET” component. A prefab of this object can be found in the project tab: “RTS Engine -> Multiplayer -> Prefabs -> UNET” under the name of “GamePlayer_UNET”. In addition it has the “Network Identity” component with “Local Player Authority” set to true. This component is spawned for each faction as soon as the game is started. It handles units, buildings and syncing everything between clients.
    1. Lockstep Cycle: As the multiplayer is built using a lockstep model, the lockstep cycle length needs to be defined in this field. This represents the time at which the server will send collected inputs in the form of the commands to all clients to perform them at the same time.
    2. Timeout Time: When a clients syncs out and falls behind from other clients, he’s given the time (in seconds) in this field in order to catch up and sync or he’ll get kicked for timing out.
    3. Sync Test: This allows the server/host to check if clients are now on the same lockstep turn to avoid any sync issues. As soon as a client syncs out, the game freezes to wait for out-of-sync clients to catch up. Settings for the sync test include the “Sync Test Reload” field which defines the time between each sync test (it’s recommended to have a value that is equal or very close to the “Lockstep Cycle”) and the “Sync Test Trigger Turn” which defines at which server turn will the server start performing the sync test.

How can we help?