I have been fighting trying to get my equippable to save across scene changes and I think I have finally narrowed down the problem.
When loading the save equippable item, it saves with the correct ID that was in the inventory at scene change. However, when UCC boots up in the new scene and creates a new Item Slot for the equippable item, it has a different ID for item slot. Making the item not valid to be equipped in the given slot and not equipped at all.
This line always fails during a scene change due to the above issue. It cannot find an item with ID for that slot. Even though the original item which was able to be equipped correctly in Scene 1 is listed in the inventory as Equippable.
ItemSetManagerBase.cs
C#:
// Remember the count to ensure the correct number of items exist within the inventory.
requiredCount++;
if (!m_CheckedItemIdentifiers.Contains(item.ItemIdentifier)) {
availableCount += m_Inventory.GetItemIdentifierAmount(item.ItemIdentifier);
m_CheckedItemIdentifiers.Add(item.ItemIdentifier);
}
Here availableCount is always 0 after scene change due to the item IDs being different.
Code:
// Ensure the inventory has the number of items required for the current ItemSet.
if (availableCount < requiredCount) {
return false;
}
Why does ItemSetManager generate a new random ID? I thought it got its ID from the items stored inside Equippable collection. Which has the correct ID of the item after scene change.
This issue really hinders the integration as no weapons can be used after a scene change.
On Latest version of both and integration.
UIS 1.1.2
UCC 2.2.7
Downloaded updated integration as of 12-8-2020 at 8pm EST