invector inventory saver

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mik60
Posts: 8
Joined: Tue Jan 17, 2023 5:18 pm

invector inventory saver

Post by mik60 »

When I add the invector inventory saver to my player I get this error.

InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.HashSet`1+Enumerator[T].MoveNext () (at <a314714511a14f84b853c03efd8682b8>:0)
PixelCrushers.SaveSystem.BeforeSceneChange () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:918)
PixelCrushers.SaveSystem+<LoadSceneCoroutine>d__135.MoveNext () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:989)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <0b78209fd00d4f419f30dd210c

Seems to save okay.
When I try to load from the menu the player disappears. If I load a second time it works.
User avatar
Tony Li
Posts: 22936
Joined: Thu Jul 18, 2013 1:27 pm

Re: invector inventory saver

Post by Tony Li »

Hi,

Put the InvectorInventorySaver component on the main Invector player GameObject (e.g., vShooterMelee_Inventory), not the Inventory child GameObject.
mik60
Posts: 8
Joined: Tue Jan 17, 2023 5:18 pm

Re: invector inventory saver

Post by mik60 »

I've Tried adding it to the player and the inventory itself. still have same problem. which part of the inventory should I attach it to?
Inv_Pic.jpg
Inv_Pic.jpg (18.47 KiB) Viewed 58 times
User avatar
Tony Li
Posts: 22936
Joined: Thu Jul 18, 2013 1:27 pm

Re: invector inventory saver

Post by Tony Li »

Hi,

Please put the InventoryInventorySaver component on the main player GameObject (Inventory_ShooterMelee) and not on any child GameObjects such as Inventory.

If that doesn't fix it by itself, you can import this updated file for the Save System which will gracefully handle configuration issues like this.

PixelCrushers_SaveSystemPatch_2025-04-05.unitypackage
Post Reply