Bug in UCC Saver (Inventory)
Re: Bug in UCC Saver (Inventory)
(I just updated the package above after receiving some info from Justin that simplifies some code. The filename changed from 'a' to 'b'.)
-
- Posts: 178
- Joined: Fri Sep 21, 2018 8:38 pm
Re: Bug in UCC Saver (Inventory)
Thanks, testing in 5 min...
-
- Posts: 178
- Joined: Fri Sep 21, 2018 8:38 pm
Re: Bug in UCC Saver (Inventory)
oppps, it says Download does not exist.
Re: Bug in UCC Saver (Inventory)
Sorry, please try now. I was working too late into the night. I had accidentally named the file Opsive_UCC_Support_Common_2019-03-11b.unitypackage.unitypackage.
-
- Posts: 178
- Joined: Fri Sep 21, 2018 8:38 pm
Re: Bug in UCC Saver (Inventory)
Nothing, it's even worst than yesterday as it only loads the assault riffle.
I have seen also the json log but it didn't help so much as I don't see the weapon name.
Even sometimes I get this error:
Do you test the scene on every update?
IndexOutOfRangeException: Index was outside the bounds of the array.
Opsive.UltimateCharacterController.Inventory.Inventory.GetItemInternal (System.Int32 slotID, Opsive.UltimateCharacterController.Inventory.ItemType itemType) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/Inventory.cs:113)
Opsive.UltimateCharacterController.Inventory.InventoryBase.GetItem (System.Int32 slotID, Opsive.UltimateCharacterController.Inventory.ItemType itemType) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:281)
Opsive.UltimateCharacterController.Inventory.InventoryBase.RemoveItem (Opsive.UltimateCharacterController.Inventory.ItemType itemType, System.Int32 slotID, System.Boolean drop) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:443)
PixelCrushers.UCCSupport.UCCSaver.ApplyData (System.String s) (at Assets/Pixel Crushers/Common/Third Party Support/Opsive UCC Support/Scripts/UCCSaver.cs:254)
PixelCrushers.SaveSystem.ApplySavedGameData (PixelCrushers.SavedGameData savedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:516)
UnityEngine.Debug:LogException(Exception)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:521)
PixelCrushers.<LoadSceneCoroutine>d__89:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:622)
I have seen also the json log but it didn't help so much as I don't see the weapon name.
Even sometimes I get this error:
Do you test the scene on every update?
IndexOutOfRangeException: Index was outside the bounds of the array.
Opsive.UltimateCharacterController.Inventory.Inventory.GetItemInternal (System.Int32 slotID, Opsive.UltimateCharacterController.Inventory.ItemType itemType) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/Inventory.cs:113)
Opsive.UltimateCharacterController.Inventory.InventoryBase.GetItem (System.Int32 slotID, Opsive.UltimateCharacterController.Inventory.ItemType itemType) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:281)
Opsive.UltimateCharacterController.Inventory.InventoryBase.RemoveItem (Opsive.UltimateCharacterController.Inventory.ItemType itemType, System.Int32 slotID, System.Boolean drop) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:443)
PixelCrushers.UCCSupport.UCCSaver.ApplyData (System.String s) (at Assets/Pixel Crushers/Common/Third Party Support/Opsive UCC Support/Scripts/UCCSaver.cs:254)
PixelCrushers.SaveSystem.ApplySavedGameData (PixelCrushers.SavedGameData savedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:516)
UnityEngine.Debug:LogException(Exception)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:521)
PixelCrushers.<LoadSceneCoroutine>d__89:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:622)
Re: Bug in UCC Saver (Inventory)
Would you please post the json log in a reply?GorkaGames wrote: ↑Tue Mar 12, 2019 3:38 pmI have seen also the json log but it didn't help so much as I don't see the weapon name.
What do you mean? Which version of Unity are you using? Which version of FPC/TPC are you using? I'm using UCC. When I get back into the office later today, I can send you my test scene. You can test it and let me know if it works or not. If it works, we can identify what's different in your scene(s) and update the saver to handle it. If it doesn't work, then we may be using different versions and we'll need to identify the differences in versions.
-
- Posts: 178
- Joined: Fri Sep 21, 2018 8:38 pm
Re: Bug in UCC Saver (Inventory)
UCC2
I have first and Third Controller. I was asking if it works in your scene. for instance,, if you pick up 6 different items, after save / load , does it work for you...
I have first and Third Controller. I was asking if it works in your scene. for instance,, if you pick up 6 different items, after save / load , does it work for you...
Re: Bug in UCC Saver (Inventory)
Yes, it works for me. This scene is in Unity 2018.3.7, UCC 2.1.1, Quest Machine 1.1.4, and the updated UCCSaver (2019-03-11b):
TestUCCSaver_2019-03-12.unitypackage
I left third person and first person both enabled so you can see that they both work, at least over here.
TestUCCSaver_2019-03-12.unitypackage
I left third person and first person both enabled so you can see that they both work, at least over here.
-
- Posts: 178
- Joined: Fri Sep 21, 2018 8:38 pm
Re: Bug in UCC Saver (Inventory)
ok, I have tested your scene and works fine (sometimes there is some small bullet error in some weapon but that's not that important now).
So that's good news.... but on my project it doesn't work, I see on the log console that you get a line for every weapon you retrieve but in my case it retrieves only 2 or 3 and not the rest.
What can be causing this?
And one more thing, even when the Attribute applied to the character is ok on the editor, the save system is duplicating the info everytime you save. Look at the pic: (I made public the data in the saver to debug in the inspector)
https://1drv.ms/u/s!AgOs7p5LnVflkMIb8Ow_MlxXKK3d3w
NOTE: I'm always using slot 0 (not 1) just in case..... and usually I don't see the slot 0 on the Player Prefs (show) component.
So that's good news.... but on my project it doesn't work, I see on the log console that you get a line for every weapon you retrieve but in my case it retrieves only 2 or 3 and not the rest.
What can be causing this?
And one more thing, even when the Attribute applied to the character is ok on the editor, the save system is duplicating the info everytime you save. Look at the pic: (I made public the data in the saver to debug in the inspector)
https://1drv.ms/u/s!AgOs7p5LnVflkMIb8Ow_MlxXKK3d3w
NOTE: I'm always using slot 0 (not 1) just in case..... and usually I don't see the slot 0 on the Player Prefs (show) component.
Re: Bug in UCC Saver (Inventory)
Thanks for letting me know about the Attributes bug. I'll fix that.
Is your character's Item Set Manager component correct?
Also check its Item Collection. Make sure the Item Collection includes all of the items that the player can pick up. In the example scene, I used the DemoItemCollection.
Is your character's Item Set Manager component correct?
Also check its Item Collection. Make sure the Item Collection includes all of the items that the player can pick up. In the example scene, I used the DemoItemCollection.