I am rather new to Unity and my development experience is mostly in boring corporate software written in C.
Suppose that you have a game in which you have selectable units, each unit having multiple selectable weapons and some weapons have selectable subsystem. So player can say “I want to aim the grenade launcher part of the right arm of this mecha”. Units are not the only selectables, a player may select a certain factory and then alloys division within factory to set the specific division’s funding priority to above average.
In turn based game course on gamedev.tv there are selectable units and each unit holds components for selectable actions while actions point back to unit. With unit selected you see the buttons for available actions and the UnitActionSystem which handles most of the input knows what is selected and acts accordingly.
How would you generalize it to UnitActionSystem holding a stack of selectables and letting top of the stack handle the input potentially adding more handlers to the stack in the process? What are the possible trade-offs?
The selection can be done with a left click and deselection with a right click for example.