public void ShowTooltip(StatusEffect statusEffect) { gameObject.SetActive(true); tooltipText.text = statusEffect.Description(); float padding = 0f; Vector2 backgroundSize = new Vector2(tooltipText.preferredWidth + padding, tooltipText.preferredHeight + padding); background.sizeDelta = backgroundSize; }