Here is my case. I’m working on a RTS game shell. So for instance, I have building and unit.
Building enable creating new unit and upgrade
And unit has action.
Here is the situation, I want create UI action bar based on selected unit/building. The selection work fine. I can access to the selected unit/building list… actually I’m having a Ui panel showing icon of each unit selected unit and Incan click on the icon to select the single unit.
Movement work for group such as any rts.
Now what I want do is an action bar based on the selected unit/building.
Example : if the selection is a mix of different unit type, juste the regular move, stop,hold,attack button will show up.
If the selection contain only 1 type of unit I want for demo show all the common action + the special ability of this unit type.
I’m not looking for an existing implementation but discuss about a good way for achieving it.
Does for single unit selection what I was doing was having a prefab with all the UI element and reference the actions to a specific unit (the selected unit).
But obviously it’s not suitable for multiple selection.
I can instantiate any UI element at runtime but before doing it, if anyone has experience with that, I will appreciate advice.