public void unlockAction() { if (player.skill_points >= cost) { Action a = ActionHandlerScript.FindByID(ID); a.Unlock(); btn.interactable = false; player.skill_points -= cost; player.UpdateDisplay(); } else { errorDiplay.text = "Not enough skill points."; } }