Error: Unable to find the ItemSet

I have 3 swords and a body: 2 swords with the same Item Definition (let's calling them sword 1 and sword 2) and a third sword with another item definition (red sword ). I pickup those 4 items. And in the inventory menu, when I equip:
- from Sword 1 to body it works fine
- from Sword 2 to body it works fine
- from Sword 1 to Red Sword it works fine
- from Sword 2 to Red Sword it works fine
- All switching are Ok... except when switching between sword 1 to sword 2 or sword 2 to sword 1, I get the following error:

Equip Items in inventory.png

It seems that I cannot equip to an item of the same item category.

Having a look in the demo can't help because there is no use case where your can pickup 2 swords, it is only one sword accepts in same time in inventory.
 
I just tried it in the demo by removing the sword restriction and I didn't get any error (I got another error but nothing related to yours, so thank you for bringing that to my attention :) )

My guess would be that your item set manager is not set up correctly. So the item you are trying to add does not know where to go.

As you can see here the Item set category is Equippable. And we set the Sword ItemDefinition to in the right hand:
1597056820414.png

The reason the equippable appears as an item set category is because we set the "exposedItemSet "attribute to true:
1597056899595.png
In the demo we can equip the excalibur as if it was a sword. That's because the parent of the item definition is Sword:
1597057145417.png

Let me know if that helps.
 
Basically, I try to redo what I see in the integration demo but in meantime, I try to have my own prefabs and duplicate icons, sprite to later be able to be fully separated. After I will be able to change the database to use my own 3D models.

Then I copy manually from demo and reproduce in my project. It helps me to have a better understanding of the setup, attributes and components of the asset.
 
As you can see my "red sword" is parented to "my new sword".

About Item Set Manager, in play mode, I have the following setup:
Set Item Manger in play mode.png

In inventory all seems correct:

Equippable.pngEquipped.png
 
I think that the issue is that you have almost all (if not all) of your category set with the "ExposedItemSet" set to true.
So when an item tries to find the item set it belongs to it'll find the wrong one.
Go through all your categories and makes sure only Equippable, LeftHandGrenade, and RightHandGrenade have the the "ExposedItemSet" set to true
 
I had tried to reproduce a part of the UIS demo database in term of inheritance. Then, I have had the following:
Item Defintion : Sword --> Melee --> Single Item --> Weapons --> Usable Equippable Item --> Equippable. I know it is quite complexe structure and at this level of my game it is not really relevant but it was for training purpose on this asset.

Based on your advice I did that:
Melee --> Single Item --> Equippable (more simpler isn't it! Like in demo)

I get the exact same error message and of course this change has broken my tabs Weapons in the inventory and I have now Melee instead that it is correct and that I understand. I can update it quickly now that I understand better the implementation.

So, I think that manner that "ExposedItemSet" of my database is defined it is not the source of the issue.

Well, I abandon trying to make it works because the setup with "my new sword" and "my red sword" is enough for my current requirements. I only have to enable/disable the field "Pickup On Trigger Enter" to display or not the UI message. I remove this "corrumpted" pickup and will use the working mechanism! ... Keep it simple Cyril! :p


Whatever thanks for you feedback.
 
Last edited:
Sorry I think you misunderstood the solution I was talking about.

I was talking about the "ExposedItemSet" attribute. As you can see below it is false for Melee.

In your case that attribute should only be set to true for the categories Equippable, LeftHandGrenade, and RightHandGrenade.

The other categories should either not have the attribute at all or be set to false if they inherit the attribute from a parent category.

1597143459307.png

(Note there are some categories in the screenshot above that you won't see yet, they'll be added in the next update. You can ignore them)

You should be able to keep the old category hierarchy you had before. Don't forget that categories can have multiple parents so it does not need to be a linear hierachy.

I hope that fixes your issue
 
I must admit that I had misunderstood your point. Sorry for that you are right! When I put "true" in the right item definition it works correctly as expected.

Thank to put me in the right way!
 
Hello,

I am running into a similar error message when using the Pixel Crushers Dialogue System's Save System to load the scene. Only Category= Equippable has the ExposedItemSet = TRUE. The inherited categories are all set to false. But the error still occurs - but only when using Pixel Crushers Dialogue System Save System to load the scene.

Do you have any ideas what might be causing this error?



Error: Unable to find the ItemSet for item 1 My Body (3560386802) in category index 0.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.UltimateInventorySystemBridge:OnItemActionEquipUnequip(ItemInfo, Boolean) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/UltimateInventorySystemBridge.cs:313)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.UltimateInventorySystemBridge:OnAddItemToInventory(ItemInfo, ItemStack) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/UltimateInventorySystemBridge.cs:247)
Opsive.Shared.Events.InvokableAction`2:Invoke(ItemInfo, ItemStack)
Opsive.Shared.Events.EventHandler:ExecuteEvent(Object, String, ItemInfo, ItemStack)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:NotifyAdd(ItemInfo, ItemStack) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:381)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemSlotCollection:SetItemAmount(Item, Int32, Int32, Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemSlotCollection.cs:261)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemSlotCollection:AddItem(ItemInfo, Int32) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemSlotCollection.cs:225)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemSlotCollection:AddItem(ItemInfo, ItemStack) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemSlotCollection.cs:178)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:AddItem(Item, Int32) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:463)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:AddItems(ListSlice`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:499)
Opsive.UltimateInventorySystem.SaveSystem.InventorySaver:DeserializeAndLoadSaveData(Serialization) (at Assets/Opsive/UltimateInventorySystem/Scripts/SaveSystem/InventorySaver.cs:128)
Opsive.UltimateInventorySystem.SaveSystem.SaverBase:Load() (at Assets/Opsive/UltimateInventorySystem/Scripts/SaveSystem/SaverBase.cs:84)
Opsive.UltimateInventorySystem.SaveSystem.SaveSystemManagerNoDisk:LoadInternal(Int32) (at Assets/Pixel Crushers/Common/Third Party Support/Opsive UIS Support/Scripts/SaveSystemManagerNoDisk.cs:52)
Opsive.UltimateInventorySystem.SaveSystem.SaveSystemManager:Load(Int32) (at Assets/Opsive/UltimateInventorySystem/Scripts/SaveSystem/SaveSystemManager.cs:216)
PixelCrushers.UISSupport.UISSaver:ApplyData(String) (at Assets/Pixel Crushers/Common/Third Party Support/Opsive UIS Support/Scripts/UISSaver.cs:32)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:625)
PixelCrushers.<LoadSceneCoroutine>d__105:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:736)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
 
Yes, my character has an item set for all my equippable weapons. The error occurs for whichever weapon was equipped at the time of saving (not just for the body). Thanks, Jay
 
@Jbacal Could you double check that you are using the latest version of UCC (2.2.8), UIS (1.1.4) and the integration package.
Make sure to double check within our Editor managers on the bottom left of the "Welcome" Menu.
Unity has been having issues updating packages saying the update is installed when it is not. It is mentioned in the second paragraph of the release notes for UIS :https://opsive.com/news/ultimate-inventory-system-1-1-4-released/

Also on the character make sure you are using the "Inventory Bridge Saver" not the "Inventory Saver". The bridge requires items to be loaded in a special way so you cannot use the simple Inventory Saver component.
 
Updated UIS to 1.1.4 (had to delete package cache), updated integration package and then deactivated the "Inventory Saver" component and... no errors!! Yay!!

Can I actually delete the Inventory Saver component or should I leave it deactivated?

Thanks, Jay
 
You can delete it, all you need is the Inventory Bridge Saver component if you wish to save and load your character Inventory
 
Top