private InventorySlot CreateSlot(Inventory inventory, InventoryItem inventoryItem, int count) { var slot = Instantiate(slotPrefab, slotsParent); slot.InitSlotVisualisation(inventoryItem.GetSprite(), inventoryItem.GetName(), count); slot.AssignSlotButtonCallback(() => inventory.AssignItem(inventoryItem)); return(slot); }