Items suddenly equipping inactive

Klin

Member
Hi,
I had a few items for my main character and an AI Agent, working all fine.

Then I created another AI Agent with another weapon in another scene (without the game manager open). So when I pressed play, several error messages appeared and I was worried so I deleted the new item again, along with the automatically created InventoryDatabase_EquippedSlots & InventoryDatabase_ItemSetRulesObject (I deleted the correct ones -> only the new ones created for the new AI Agent).

After that I went back to the main scene with the game manager and everything.
But when I hit play now, the characters (player and AI) spawn without any items. Or rather, they are actually spawned, but they are inactive in the hierarchy.
No error messages appear, I checked every component, all looks fine (every component is connected to the Inventory components in the project etc.)

I did not change anything at all appart from what I described above. Restarted the editor several times, updated the scene with the Inventory System Manager (also tried to create new ones) but the items won't show up anymore.

So to test thinks out, I created again another item for the new AI Agent and for the main character.
This time I paid attention to have the game manager in the scene.
But now I get the same problem with every item on every character.

I have different Item Categories for the main character & AI's.

Sorry for the pamphlet but I'm totally lost.

Thanks a lot for helping out!



Btw, another quick question regarding the integration:
Do I need a UCC ItemCollection for every AI Agent / Character or may I leave that out (I guess so)?
 
UCC ItemCollections are not used when using the Inventory system integration. Instead the Inventory system database is used to organize items.

As for your issue I'm not sure what could have happened.
Next time you have errors with the integration check to see if it's part of the common errors described on this page:

Your AI characters are using the CharacterInventoryBridge correct? You say that are items are spawned but not active. So I assume your InventoryItemSetManager created the and ItemSet for your item. Can you confirm that by checking the inspector at runtime? You can send me a screenshot of it.

If that's the case then that means the item is soft equipped but not active equipped. Normally Items are active equipped if they are set directly within the Equippable Item Collection (the UIS Item Collection), instead of within the loadout.

It is possible that your ItemSetRules are creating multiple ItemSets including an empty one which isequipped by default. A screenshot of your InventoryItemSetManager inspector at runtime should be able to confirm whether that is the issue or not.

In the next update I will be adding a new Item Collection for the integration call CharacterLoadoutItemCollection that lets you choose where the items are loaded and if they should active or soft equip, so you'll have more control.
 
I deleted the Category Item Set Rules of my main character and readded it (but only for main character).

Suddenly all items are back (including AI Agents).

Thanks for the hint!


EDIT:

I got some problems with crashes and deleted/recreated the InventoryDatabaseEquippedSlots & InventoryDatabaseItemSetRulesObject.

Everything works fine.

Best regards.
 
Last edited:
Top