Exemplo n.º 1
0
    private void AddItemToSpace(Item item, int count = 1)
    {
        GameObject but = Instantiate(Parent.ItemButtonPrefab.gameObject);
        ItemButton itb = but.GetComponent <ItemButton>();

        itb.SetItem(item);
        but.transform.SetParent(InventorySpace.transform, false);
        itb.SetDisplayInventory(this);
    }