The Entity Component Task UI Data is an asset file that is used for fields that define UI related data for tasks of components that can be attached to entities (units, buildings and resources).
To create a new entity component task UI data, right-click with the mouse in the project tab and click on: Create -> RTS Engine -> Entity Component Task UI Data. An asset file will be then created, select it and define the new task UI information.
For example, a Resource Generator component can be attached to units and buildings and it allows them to produce resources to the faction they belong to. These resources can be collected through a task that the player launches through the task panel when the resource generator is selected. The Entity Component Task UI Data asset file allows to define how this task looks and how it behaves.
Having it as a scriptable object (or asset file) allows the Entity Component Task UI Data to be reusable by different components. For example, the Unit Movement component allows to have a movement task on the task panel when a unit is selected. The same movement task UI data asset file can be used for the Unit Movement component of all unit types so that the same movement task can be launched even when different types of units are selected.
- Code: Unique code for each task.
- Enabled: When disabled, the associated task can not be displayed in the task panel.
- Display Type: Selection conditions to display the associated task.
- Single Selection: Only display task if the entity is the only one selected.
- Homo Multiple Selection: Only display task if only entities of the same type are selected.
- Hetero Multiple Selection: Display task as long as the source entity is selected.
- Icon: The sprite to be used for the task’s icon.
- Panel Category: The category of the UI task panel where the task will be placed at.
- Force Slot: Enable to force the task to be drawn on a specific slot of the panel category.
- Slot Index (only if ‘Force Slot’ is enabled): Index of the slot to draw the task in. Make sure that there are enough pre-created tasks in the panel category to support this index value.
- Tooltip Enabled: Show a description of the task in the tooltip when the mouse hovers over the task?
- Description: Description of the task that will appear in the task panel’s tooltip, in case it is enabled.
- Hide Tooltip On Click: Hide tooltip (if it was enabled) when the task is clicked?