DemoCompareAttributeView error

Paramedic

Member
I copied DemoCompareAttributeView to my project, Equipper is not edited, it is in his original form. When I open my inventory there is always first item highlighted, then after adding DemoCompareAttributeView and setting up everything I got this errors that's keep and keep multiplying to 999+. after I open inventory. When I move to another slot this error will be shown only once after every highlighting.
1671739882620.png

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateInventorySystem.Equipping.Equipper.GetEquipmentStatPreviewAdd (System.String attributeName, Opsive.UltimateInventorySystem.Core.Item itemPreview) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/Equipping/Equipper.cs:459)
Opsive.UltimateInventorySystem.Demo.UI.VisualStructures.AttributeUIs.CompareAttributeView.SetValue (Opsive.UltimateInventorySystem.Core.DataStructures.AttributeInfo info) (at Assets/Scripts/Inventory/CompareAttributeView.cs:67)
Opsive.UltimateInventorySystem.UI.Views.View`1[T].SetValue (T newValue) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Views/View.cs:209)
Opsive.UltimateInventorySystem.UI.Item.ItemViewModules.CategoryAttributeViewSetItemViewModule.UpdateAttributeUIs () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewModules/CategoryAttributeViewSetItemViewModule.cs:99)
Opsive.UltimateInventorySystem.UI.Item.ItemViewModules.CategoryAttributeViewSetItemViewModule.SetValue (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo info) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewModules/CategoryAttributeViewSetItemViewModule.cs:61)
Opsive.UltimateInventorySystem.UI.Views.View`1[T].SetValue (T newValue) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Views/View.cs:209)
Opsive.UltimateInventorySystem.UI.Item.ItemDescriptionBase.SetValue (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemDescriptionBase.cs:54)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotContainerDescriptionBinding.DrawDescription (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotContainerDescriptionBinding.cs:134)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotContainerDescriptionBinding.DrawDescription (Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotEventData sloteventdata) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotContainerDescriptionBinding.cs:94)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotContainerDescriptionBinding.HandleOnSelect (Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotEventData sloteventdata) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotContainerDescriptionBinding.cs:62)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotsContainerBase+<>c__DisplayClass78_0.<Initialize>b__1 () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlotsContainerBase.cs:222)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.OnSelect (UnityEngine.EventSystems.BaseEventData eventData) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:316)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlot.OnSelect (UnityEngine.EventSystems.BaseEventData eventData) (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlot.cs:106)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.Select () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:97)
Opsive.UltimateInventorySystem.UI.Grid.GridGeneric`1[T].DrawInternal () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Grid/GridGeneric.cs:337)
Opsive.UltimateInventorySystem.UI.Grid.GridBase.Draw () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Grid/GridBase.cs:379)
Opsive.UltimateInventorySystem.UI.Item.InventoryGrid.DrawInternal () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/InventoryGrid.cs:240)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotsContainerBase.LateUpdate () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlotsContainerBase.cs:695)
Opsive.UltimateInventorySystem.UI.Item.InventoryGrid.LateUpdate () (at Assets/Plugins/Opsive/UltimateInventorySystem/Scripts/UI/Item/InventoryGrid.cs:280)

It points to this part of code:
1671740334181.png
 
That probably means that "m_Slots" was not initialized or one of the Categories is null in the equipper slots.

I see that you have two warnings on top of the 999+ errors. Are they related? Maybe they say that the equipper was not correctly initialized and why?
 
Top