public void SetUpButton(ItemClass passedItem, ItemListManager passedListManager) { listManager = passedListManager; item = passedItem; nameText.text = item.itemType; LvlText.text = "Lvl: " + item.level.ToString(); QualityText.text = item.QualityIntToString(); GetComponent <LayoutElement>().preferredHeight = transform.parent.GetComponent <RectTransform>().rect.width / 4; iconSprite = listManager.SetIconSprite(item.itemType); iconImage.sprite = iconSprite; itemEquipPool = passedListManager.itemEquipPool; }