I am somehow getting the inventory into a corrupted state. I try to clear it by calling the inventory.RemoveAllItems(), also tried inventory.RemoveAllItems(true, false)
The problem seems to be that m_itemStacks in ItemCollection does not get cleared and so persists an item in the inventory.
Here is a video of my debug session showing the problem. Sorry it is a bit long.
Is there another clear method i can use to fix this? I tried calling inventory.Initialize(true), but then the ItemSlotCollectionView seems to not be connected to the inventory correctly.
The problem seems to be that m_itemStacks in ItemCollection does not get cleared and so persists an item in the inventory.
Here is a video of my debug session showing the problem. Sorry it is a bit long.
Is there another clear method i can use to fix this? I tried calling inventory.Initialize(true), but then the ItemSlotCollectionView seems to not be connected to the inventory correctly.
Last edited: