Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Single Player Menu
  4. Lobby Manager

Lobby Manager

The Lobby Manager component handles adding/removing faction slots and holds all the settings required to launch a single player game.

When creating a single player menu using the RTS Engine menu editor, this component is attached to an object called “SinglePlayerMenu” (which is the main single player menu canvas).


  1. Lobby Faction Prefab: A prefab which includes the LobbyFaction component that holds the each faction information in the lobby. Each faction slot holds an instance of this prefab. An example of this object can be found in the project tab: RTS Engine -> Singleplayer -> Prefabs under the name of “LobbyFaction”. The prefab includes the LobbyFaction component  attached to it. It also includes UI child objects which are used to represent the faction information in the lobby:
    1. Faction Color Image: 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 “LobbyFaction” object as the event source and set the event to LobbyFaction -> “OnFactionColorUpdated”.
    2. Faction Name Input: A UI Input field 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 “LobbyFaction” object as the event source and set the event to LobbyFaction -> “OnFactionNameUpdated”.
    3. Faction Type Menu: A UI Dropdown which allows the player to pick a faction type for each faction slot. In the “On Value Changed” event of the Dropdown component, drag and drop the “LobbyFaction” object as the event source and set the event to LobbyFaction -> “OnFactionTypeUpdated”.
    4. Faction Type Menu: A UI Dropdown which allows the player to pick a NPC Manager for each faction slot. In the “On Value Changed” event of the Dropdown component, drag and drop the “LobbyFaction” object as the event source and set the event to LobbyFaction -> “OnFactionNPCManagerUpdated”.
    5. Remove Button: A UI Button that the player can use to remove the faction slot associated with the instance of the lobby faction. In the “On Click” event of the Button component, drag and drop the “LobbyFaction” object as the event source and set the event to LobbyFaction -> “Remove”.
  2. Minimum Lobby Factions: The minimum amount of faction slots that need to be present before a game can be started from the single player menu.
  3. Allowed Colors: A list of the colors that a faction is allowed to have. Players can choose a color for their faction once in a lobby/room.
  4. Available Maps: A list that holds all the maps that can be used in a multiplayer game. For each map, a couple of settings must be defined:
    1. Scene: Drag and drop the game map’s scene into this field.
    2. Name: Name of the map to show in the UI menu.
    3. Description: When this map is selected, this description is displayed.
    4. Max Factions: Maximum amount of factions that this map supports.
    5. Initial Population: The initial amount of population for the factions in this map.
    6. Faction Types: A list of Faction Type Info asset files that define the possible faction types that can play in the map.
  5. NPC Managers: A list of prefabs that have the NPC Manager component attached to them and which will can be assigned to the NPC faction slots.

How can we help?