private bool SwapItems(InventorySlots from) { if (IsEmpty) { return(false); } if (from.MyItem.GetType() != MyItem.GetType() || from.MyCount + MyCount > MyItem.StackSize) { //Copy all items from A ObservableStack <Item> tmpFrom = new ObservableStack <Item>(from.itemStack); Debug.Log("SLOT A COPIED TO B"); //Clear slot A from.itemStack.Clear(); Debug.Log("SLOT A CLEARED"); //Copy from B and put in A from.AddItems(itemStack); //Clear B itemStack.Clear(); //Move from the copy of A to B AddItems(tmpFrom); return(true); } return(false); }