When you add an item, change the quantity in the Inventory Map?
Add a print string to check.
If so, you need to either report the quantity change to the correct slot, or re-create the entire inventory widget (but this may cause performance issues).
Alternatively, you can create a delegate to which all cell widgets are bind to know when they need to update their data.
This is necessary to see what is happening. Launch PIE and add items to your inventory (several items of the same type). There will be numbers in the upper left corner of the screen. Take a screenshot of these numbers. Do they change when you add items?
This is very strange, the number of items (first digit) does not increase.
Copy the text below and paste it into your blueprint. A new function will appear in it.
Set it instead of your AddToInventory function. Then run it and try to buy 3 items of one type, then 3 items other type. Take a screenshot.
Do you mean I should remove my ‘AddToInventory’ functions? and replacing with your ‘AddToInventoryTest’? I’m so sorry, I’m still learning to use UE so I don’t know a lot and really really need help . If yes, Here’s mine.
The quantity does not change even though I already clicked it more than 1 times but is still the same at 0.