Game Manager
Role
The main component in a RTS Engine map scene. When the scene starts, this is the first component that gets initialized and is responsible for initializing the rest of the components in the scene. All manager components must be attached to child objects of the object where this component is attached. In addition, it handles defining the faction slots that can be filled by player or non-player controlled factions.
Setup
- Must be present in each map scene.
- Must be attached to the parent object of all manager components in the scene.
Inspector
Property | Description |
---|---|
Prev Scene | Scene to load when leaving this map. This is overwritten if the map is loaded through a lobby. |
Defeat Condition | Default faction defeat condition to determine how to win/lose this map. This is overwritten if the map is loaded through a lobby. Defeat conditions include: - Eliminate Main: When the main faction entities of a faction slot are all eliminated, the faction slot is marked as defeated. - Eliminate All: When all faction entities of a faction slot are eliminated, the faction slot is marked as defeated. - Custom: This option requires you to manually call the OnFactionDefeated method of this component. |
Peace Time Duration | Time (in seconds) after the game starts, during which no faction can attack another. |
Win Game Audio | Audio clip played when the local player wins the game. |
Lose Game Audio | Audio clip played when the local player loses the game. |
Faction Slots | Each element represents a Faction Slot that can be filled by a player or AI. |
Random Faction Slots | Enable to allow randomizing the slot that each faction gets. |