static public OnGroundItem CreateOnGround(ItemSO item, Vector3 pos) { pos.z = 0; GameObject go = Instantiate(OnGroundItemsList.instance.GetItemPrefab(item), pos, Quaternion.identity); OnGroundItem newItem = go.GetComponent <OnGroundItem>(); newItem.Item.Count = item.Count; return(newItem); }
void DropItemOnGround(Vector3 newItemPos) { OnGroundItem.CreateOnGround(item, newItemPos); InventoryUI.Inventory.Items[invId] = null; InventoryUI.UpdateUI(); }