private void UpdateView() { var alpha = 1f; if (_itemStack.GetCount() == 0) { alpha = 0f; Image.sprite = null; } else { Image.sprite = _itemStack.GetItems()[0].GetSprite(); Text.text = _itemStack.GetCount().ToString(); } Image.color = InventoryUtils.ChangeAlpha(Image.color, alpha); Text.color = InventoryUtils.ChangeAlpha(Text.color, alpha); }