public void CreateButtonsForItems() { for (int i = 0; i < shopItems.Count; i++) { if (selections.Count <= i) { selections.Add(GameObject.Instantiate(buttonTemplate)); } ShopItemOld curShopItem = shopItems[i]; selections[i].GetComponent <Buy>().thisItem = curShopItem; selections[i].GetComponentInChildren <TextMeshProUGUI>().text = curShopItem.displayName + " " + curShopItem.price; } }
public Item CreateItem(ShopItemOld shopItem) { Item createdItem = new Item(); return(createdItem); }