public void ClearInventory() { foreach (InventorySlot IS in InventorySlots) { Item temp = IS.GetHeldItem(); if (temp != null) { temp = IS.RemoveItem(IS.GetHeldItem().stackCount); Destroy(temp.gameObject); } } }