public bool DropItem(ItemsID item) { bool result = ItemsInInventory.Remove(item); if (result) { ItemData data = GetData(item); if (data != null && data.OriginObject != null) { Transform pivotTransform = LevelManager.Instance.Player._camera.transform; Vector3 spawnPoint = pivotTransform.position + pivotTransform.forward * 2; Instantiate(data.OriginObject, spawnPoint, Quaternion.identity); } } inventoryUI.RefreshInventory(ItemsInInventory); return(result); }