[BUG] Error after adding an item attribute of type AnimationCurve.

WeiYiHua

Member
1. Create a new project with Unity 2021.3.19f1.
2. Download and install Ultimate Inventory System 1.2.15.
3. Adding an item attribute of type AnimationCurve.
1681990632855.png
4. Run the Demo scene.

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
System.BitConverter.ToInt32 (System.Byte[] value, System.Int32 startIndex) (at <c9d3ffd4b98649ee9989e1908eaca019>:0)
Opsive.Shared.Utility.Serializer.BytesToInt (System.Byte[] values, System.Int32 valuePosition) (at <d8d674fadd354c4780600f41302949be>:0)
Opsive.Shared.Utility.Serializer.BytesToAnimationCurve (System.Byte[] values, System.Int32 valuePosition) (at <d8d674fadd354c4780600f41302949be>:0)
Opsive.Shared.Utility.Serializer.BytesToValue (System.Type type, System.String name, System.Collections.Generic.Dictionary`2[TKey,TValue] valuePositionMap, System.Int64 hashPrefix, System.Byte[] values, System.Int32[] valuePositions, UnityEngine.Object[] unityObjects, System.Boolean useFields, Opsive.Shared.Utility.MemberVisibility visibility, Opsive.Shared.Utility.Serialization+HashType hashType, System.Func`3[T1,T2,TResult] onValidateCallback) (at <d8d674fadd354c4780600f41302949be>:0)
Opsive.Shared.Utility.Serialization.DeserializeFields (System.Object obj, System.Int64 hashPrefix, System.Collections.Generic.Dictionary`2[TKey,TValue] valuePositionMap, System.Int32[] valuePositions, System.Byte[] values, UnityEngine.Object[] unityObjects, Opsive.Shared.Utility.MemberVisibility visibility, Opsive.Shared.Utility.Serialization+HashType hashType, System.Func`3[T1,T2,TResult] onValidateCallback) (at <d8d674fadd354c4780600f41302949be>:0)
Opsive.Shared.Utility.Serialization.DeserializeFields (Opsive.Shared.Utility.MemberVisibility visibility, System.Func`3[T1,T2,TResult] onValidateCallback) (at <d8d674fadd354c4780600f41302949be>:0)
Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeCollection.Deserialize (System.Boolean force) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/AttributeCollection.cs:106)
Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeCollection.Initialize (System.Boolean force) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/AttributeCollection.cs:85)
Opsive.UltimateInventorySystem.Core.AttributeSystem.ItemCategoryAttributeCollection.Initialize (Opsive.UltimateInventorySystem.Core.ItemCategory itemCategory, System.Boolean force) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/ItemCategoryAttributeCollection.cs:36)
Opsive.UltimateInventorySystem.Core.ItemCategory.DeserializeAttributeCollections () (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/ItemCategory.cs:181)
Opsive.UltimateInventorySystem.Core.ItemCategory.Deserialize () (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/ItemCategory.cs:169)
Opsive.UltimateInventorySystem.Core.ObjectCategoryBase`2[Tc,Te].Initialize (System.Boolean force) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/ObjectCategoryBase.cs:132)
Opsive.UltimateInventorySystem.Core.ItemCategory.Initialize (System.Boolean force) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/ItemCategory.cs:134)
Opsive.UltimateInventorySystem.Storage.InventorySystemDatabase.Initialize (System.Boolean force, System.Boolean updateAttributes) (at Assets/Opsive/UltimateInventorySystem/Scripts/Storage/InventorySystemDatabase.cs:252)
Opsive.UltimateInventorySystem.Editor.Managers.DatabaseValidator.CheckIfValid (Opsive.UltimateInventorySystem.Storage.InventorySystemDatabase database, System.Boolean autoFix) (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/DatabaseValidator.cs:97)
Opsive.UltimateInventorySystem.Editor.Managers.InventoryMainWindow.ValidateDatabase () (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/InventoryMainWindow.cs:315)
Opsive.UltimateInventorySystem.Editor.Managers.InventoryMainWindow.OnEnable () (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/InventoryMainWindow.cs:214)

Inventory Manager Window cannot be displayed.1681990765877.png
 
Top