Equipped item not stored after restart

sakandar

New member
Hi, i equipped the item from inventory and its working fine. But it is not stored in DB. So when i restart the game, item automatically unequipped.

Please suggest any solution.
Thanks,
Cheers!
 
Are you using an InventorySaver component set next to your Inventory component?

Have you added the Save System Manager component as well as the InventorySystemManagerItemSaver? Check this page:

Compare your setup with the demo setup and see how your savers differ
 
Yes, my existing items are working fine. But i added some new items and equipped them at runtime. But when i restart the game, my new items got unequipped
 
I will need more context to understand what is going on.

I'm assuming the item that you are equipping is unique and mutable can you confirm?
You said you added items. What do you mean by that? Did you add them in the ItemDefinition editor and then at runtime added the item to the character to equip them?
Or did you create the itemDefinition through script at runtime?

Creating ItemCategories and/or ItemDefinitions at runtime will not work with the save system. Only Items created from existing ItemDefinitions can be saved.

You mentioned your item is being unequipped. But does that mean it still exists in your character inventory? If so my guess is that something is preventing your item from being equipped. Or that it is equipped but gets unequipped on start.
Could you double check your equipment ItemCollection just before saving and right after loading. See where the item goes and if it has the same ID that was saved
 
Top