Page 1 of 1
Invector Inventory Save Question
Posted: Mon Oct 28, 2019 8:59 pm
by nitrox32
I'm having trouble getting my Invector player's inventory to save across scene changes. When I change scenes (using scene portal)I lose my inventory from the previous scene. I believe I have everything set up correctly according to the documentation. Don't Destroy on Load is unticked in the inventory UI prefab that my player uses and Use Instance on my player is also unticked. The inventory will save if I save the game and reload it, just not across scene changes.
Re: Invector Inventory Save Question
Posted: Tue Oct 29, 2019 8:24 am
by Tony Li
Hi,
Do the player GameObjects in both scenes have an InventoryInventorySaver component with the same Key value?
Re: Invector Inventory Save Question
Posted: Tue Oct 29, 2019 8:37 am
by nitrox32
You are speaking of the inventory objects or the player itself?
Re: Invector Inventory Save Question
Posted: Tue Oct 29, 2019 8:56 am
by Tony Li
The player itself. In both scenes, the player GameObject should have an InvectoryInventorySaver component with the same key (e.g., "PlayerInventory") and with Save Across Scene Changes ticked.
Here's an example:
InvectorVendorSaveLoadExample_2019-03-29.unitypackage
Ignore the "vendor" stuff. It was made for a different question. Add both scenes to build settings. Play scene 1. Pick up the gun and go through the portal to scene 2.
Re: Invector Inventory Save Question
Posted: Tue Oct 29, 2019 5:28 pm
by nitrox32
I got it working. I had everything setup correctly except one of my scenes has Append Saver Type to Key checked. I unchecked it in both scenes and now everything is working. Thanks!
Re: Invector Inventory Save Question
Posted: Tue Oct 29, 2019 8:27 pm
by Tony Li
Happy to help! Glad you got it working.
Re: Invector Inventory Save Question
Posted: Wed Apr 13, 2022 4:10 am
by marcinn
Hello,
I have installed latest Invector Support and I can't find any other scripts there then DialogueSystemInvectorBridge. Is there any chance to get missing scripts like InvectorInventorySaver?
Kind Regards,
Marcin
Re: Invector Inventory Save Question
Posted: Wed Apr 13, 2022 9:05 am
by Tony Li
Hi,
There are two packages to import. Please also import Assets / Plugins / Pixel Crushers / Common / Third Party Support / Invector Support.