I’m also having an issue where the action buttons are not clickable. The UI is correctly rendering either one or two buttons depending on the unit that was selected. I can select units back and forth infinite number of times and it correctly re-renders with either Move or Spin. The button doesn’t show any sort of click animation like I see in the videos and the listener never fires.
public class ActionButtonUI : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI textMeshPro;
[SerializeField] private Button button;
public void SetBaseAction(BaseAction baseAction)
{
textMeshPro.text = baseAction.GetActionName().ToUpper();
//this code gets executed
button.onClick.AddListener(() => {
UnitActionSystem.Instance.SetSelectedAction(baseAction);
//this code never gets executed
});
}
}