skinwalker
Member
My restricts item of category "Hat" then I drag and drop the hat into it and instead of snapping it back to the collection it came from there is an error and the hat disappears.
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateInventorySystem.UI.Grid.ItemShapeGridData.AddItem (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection receivingItemCollection) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Grid/ItemShapeGridData.cs:749)
Opsive.UltimateInventorySystem.UI.Grid.ItemShapeGridData.AddItemToPosition (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, UnityEngine.Vector2Int position) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Grid/ItemShapeGridData.cs:772)
Opsive.UltimateInventorySystem.UI.Grid.ItemShapeGridData.AddItemToPosition (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Grid/ItemShapeGridData.cs:796)
Opsive.UltimateInventorySystem.UI.Grid.ItemShapeGrid.AddItem (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Grid/ItemShapeGrid.cs:254)
Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.DropActions.ItemViewShapeDropAction.Drop (Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewDropHandler itemViewDropHandler) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/DragAndDrop/DropActions/ItemViewShapeDropAction.cs:71)
Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewDropActionsWithConditions.Drop (Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewDropHandler itemViewDropHandler) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/DragAndDrop/ItemViewSlotDropActionSet.cs:235)
Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewSlotDropActionSet.HandleItemViewSlotDrop (Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewDropHandler itemViewDropHandler) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/DragAndDrop/ItemViewSlotDropActionSet.cs:116)
Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewDropHandler.HandleItemViewSlotDropInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/DragAndDrop/ItemViewDropHandler.cs:259)
Opsive.UltimateInventorySystem.UI.Item.DragAndDrop.ItemViewDropHandler.HandleItemViewSlotDrop (Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotEventData dropSlotEventData) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/DragAndDrop/ItemViewDropHandler.cs:249)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotsContainerBase+<>c__DisplayClass78_0.<Initialize>b__7 (UnityEngine.EventSystems.PointerEventData pointerEventData) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlotsContainerBase.cs:275)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.OnDrop (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:264)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IDropHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:92)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)