public void bindSpellSlot(SpellController playerSpellController) { if (playerSC != null) { playerSC.OnSelection -= updateSpellIcon; } playerSC = playerSpellController; if (playerSC != null) { Debug.Log("Spell UI bind"); playerSC.OnSelection += updateSpellIcon; SpellBehavior selected = playerSC.GetCurrentSpell(); updateSpellIcon(selected); // get cooldown progress here } else { spellIcon.sprite = defaultIcon; } }