Invector Inventory Save Question

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
nitrox32
Posts: 68
Joined: Sat Dec 01, 2018 10:41 am

Invector Inventory Save Question

Post 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.
User avatar
Tony Li
Posts: 20759
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Inventory Save Question

Post by Tony Li »

Hi,

Do the player GameObjects in both scenes have an InventoryInventorySaver component with the same Key value?
nitrox32
Posts: 68
Joined: Sat Dec 01, 2018 10:41 am

Re: Invector Inventory Save Question

Post by nitrox32 »

You are speaking of the inventory objects or the player itself?
User avatar
Tony Li
Posts: 20759
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Inventory Save Question

Post 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.
nitrox32
Posts: 68
Joined: Sat Dec 01, 2018 10:41 am

Re: Invector Inventory Save Question

Post 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!
User avatar
Tony Li
Posts: 20759
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Inventory Save Question

Post by Tony Li »

Happy to help! Glad you got it working.
marcinn
Posts: 1
Joined: Wed Apr 13, 2022 4:07 am

Re: Invector Inventory Save Question

Post 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
User avatar
Tony Li
Posts: 20759
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Inventory Save Question

Post by Tony Li »

Hi,

There are two packages to import. Please also import Assets / Plugins / Pixel Crushers / Common / Third Party Support / Invector Support.
Post Reply