// Start is called before the first frame update
void Start()
{
UnitActionSystem.Instance.OnBusyChanged += UnitActionSystem_OnBusyChanged;gameObject.SetActive(false); // Hide(); }
private void UnitActionSystem_OnBusyChanged(object sender, bool isBusy)
{
gameObject.SetActive(isBusy);/*if (isBusy) { Show(); } else { Hide(); }*/
}
/*private void Show()
{
gameObject.SetActive(true);
}private void Hide()
{
gameObject.SetActive(false);
}*/
The way I solved this was to just set active directly on the event listener. Is this like bad practice or something? I think he talked about it earlier in the course, but I can’t remember the exact reasoning.