The Unit Selection Group component allows the player to select units, assign them as group by pressing a combination of keys that you pick from the inspector and then use the same key to instantly select that assigned group, UI messages and audio clips can be also assigned for different situations to keep the player informed.
When you’re creating a new map using the RTS Engine menu editor, this component is attached to an object called “SelectionManager”.
You can remove this component if you don’t wish to use the selection group feature.
- Group Selection Slots: Each element of this array defines a unit group selection slot. For each element, make sure to assign a unique Key. That key will be used to assign a list of units to the group selection slot and then to select the assigned unit list later.
- Assign Group Key: To assign a list of units to a group selection slot, the group selection slot key and the key defined in this field must be both pressed by the later at the same time. As for the selection of the already assigned unit list, the player needs to press the key assigned to the list only.
- Show UI Messages: When enabled, the player will receive messages regarding the assignment and selection of unit groups.
- Assign Group Audio: Audio clip played when a list of units is assigned to a group selection slot.
- Select Group Audio: Audio clip played when the list of units that’s assigned to one of the group selection slots is selected.
- Group Empty Audio: Audio clip played when the player attempts to select a unit group that’s assigned to one of the group selection slots but it turns out to be unassigned/empty.