This is probably a coding philosophy question, but was hoping to get feedback on it.
We currently have an UpdateSelectedVisual() method on each button, and that means each button is responsible for deciding whether or not it should show a selection border.
In my head, that feels like something the UnitActionSystemUI would decide. Eg, buttons have their own functionality, but they don’t make larger decisions. It would mean only one call to the UnitActionSystem.Instance.GetSelectedAction(), and we’d cycle through our already-existing list of buttons tell them to set selection to true or false, depending on if their baseAction == the GetSelectedAction.
I’m not saying I’m right at all, more just hoping to check my understanding of what individual objects should do versus their managers? Having each button poll the UnitActionSystem feels almost like “going over the manager’s head.”