Basic UI Module
Includes components that listen subscribe to the RTS Engine events and draws the UI accordingly to the actions the local player is executing.
Features
- Handles different menus: win, lose, pause and freeze menus.
- Handles pausing the game.
- Handles drawing hover health bars on top of entities.
- Handles displaying the peace time at the beginning of a game.
- Handles drawing tasks on the task panel as well as pending tasks.
- Handles drawing and displaying information for one or multiple selected entities.
- Handles displaying error messages to the player.
- Handles the UI tooltip.
- Handles drawing the map resources and their count.
Requirements
- RTS Engine 2022.0.0 or higher
Installation
Find it in the Core installation of the RTS Engine or get it from the Basic UI Module and import it into your project.
Guide
WIP.
Changelog
v2023.0.0
Release Date: 05/10/2023
Requirements
RTS Engine 2023.0.0 or higher
Changes:
UPDATE all UI components to use TextMeshPro instead of Unity Text.
- UPDATE resource panel UI handler to allow for drawing the collector/producer count for the resource types that it displays in the UI elements.
- UPDATE the task UI handler to allow displaying the control type assigned to a task over the task's icon, in case one has been defiend for the task.
- UPDATE resource panel UI handler to allow to select the collectors/producers of each resource type when the player clicks on the resource type.
- UPDATE Basic UI task UI prefabs to have events hooked up through code instead of hooking up the event manually through the inspector.
- UPDATE BasicUI prefab to include each dynamically changed panel in its own canvas.
- UPDATE UI components to avoid unnecessary updates to UI elements.
- ADD a UI handler component that allows to draw the faction entities of the local player faction slot as UI tasks showing each unique faction entity type with its amount count and allowing to select all entities with each unique code through a click on the UI element.
- ADD confirmation buttons for leaving to the main menu from the map scene pause menu (optional).
- ADD UI handler component that draws the faction stats (name, ID and one resource type amount by default) in the faction's color and strikes the stats text in case the faction slot is eliminated.
- ADD UI handler with functions that allow to select local faction slot attack units and idle worker units and hooked those two functions with UI buttons.
- ADD the option to pre create multiple selection panel elements when the map scene is started.
v2024.0.0
Release Date 06/01/2024
Requirements
RTS Engine 2024.0.0 or higher
Changes
UPDATE FactionSlotStatsUIHandler to handle missing resource types by ignoring them and only considering valid ones instead of erroring out.