private void SetupSlot(Item item, GameObject parentPanel, List <ShopSlot> slots) { GameObject newObject = Instantiate(itemTemplate.gameObject, parentPanel.transform); ShopSlot slot = newObject.GetComponent <ShopSlot>(); slot.shop = this; slots.Add(slot); slot.SetContents(item, 1); slot.descriptionPanel = descriptionPanel; }