public void RefreshInventoryList(bool ignoreBoxes) { allProduct.Clear(); Dispensary dispensary = dm.dispensary; List <StoreObjectFunction_DisplayShelf> displayShelves = dispensary.GetAllDisplayShelves(); foreach (StoreObjectFunction_DisplayShelf displayShelf in displayShelves) { foreach (Product product in displayShelf.products) { AddProduct(product); } } if (!ignoreBoxes) { // Serialization ignores boxes, and handles them seperately foreach (BoxStack boxStack in looseBoxes) { //print("Trying to add: " + boxStack.uniqueID); AddProduct(boxStack); } } }