Page 1 of 1

invector inventory saver

Posted: Sat Apr 05, 2025 9:21 pm
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.

Re: invector inventory saver

Posted: Sat Apr 05, 2025 10:51 pm
by Tony Li
Hi,

Put the InvectorInventorySaver component on the main Invector player GameObject (e.g., vShooterMelee_Inventory), not the Inventory child GameObject.

Re: invector inventory saver

Posted: Sun Apr 06, 2025 4:23 pm
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 123 times

Re: invector inventory saver

Posted: Sun Apr 06, 2025 9:13 pm
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