mdonatelli
New member
Hello again,
I've been following along with the Ultimate Inventory System Integration Part 1+2 videos and am running into an issue at about the 43:10 mark of the first video.
The system I want is that you equip a weapon via your inventory. I have set up so many of the elements: The Item Categories+Definitions, the UI actions, and the Item itself in accordance with the tutorial.
However, when I try to equip the Pistol from the inventory, I get this error:
It happens at the moment I choose the Equip action on the Item in the inventory.
My item definition has the proper prefabs. 1) the Prefab created for the item via the tutorial steps, and 2) a simple prefab that is just a game object with the 3d mesh for the drop visualization. I also went through the Item Binding steps using the Integrations window.
I've rewatched several times and am at a loss for what I'm missing and what could be null on what prefab. Any direction or places to look would be greatly appreciated. Hopefully, I'm just missing something and it's not a bug.
I've been following along with the Ultimate Inventory System Integration Part 1+2 videos and am running into an issue at about the 43:10 mark of the first video.
The system I want is that you equip a weapon via your inventory. I have set up so many of the elements: The Item Categories+Definitions, the UI actions, and the Item itself in accordance with the tutorial.
However, when I try to equip the Pistol from the inventory, I get this error:
Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge.MoveItemToEquippable (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, System.Int32 equippableCollectionIndex, System.Int32 slotIndex) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:349)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge.MoveEquip (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, System.Int32 equippableItemCollectionSet, System.Int32 slotID, System.Boolean equip) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:457)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge.MoveEquip (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, System.Boolean equip) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:443)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterEquipUnequipItemAction.InvokeActionInternal (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, Opsive.UltimateInventorySystem.ItemActions.ItemUser itemUser) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/InventoryItemActions/CharacterEquipUnequipItemAction.cs:76)
Opsive.UltimateInventorySystem.ItemActions.ItemAction.InvokeAction (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, Opsive.UltimateInventorySystem.ItemActions.ItemUser itemUser) (at Assets/Opsive/UltimateInventorySystem/Scripts/ItemActions/ItemAction.cs:97)
Opsive.UltimateInventorySystem.UI.Panels.ActionPanels.ItemActionPanel.InvokeActionInternal (System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ActionPanels/ItemActionPanel.cs:66)
Opsive.UltimateInventorySystem.UI.Panels.ActionPanels.ActionPanel`1[T].InvokeAction (System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ActionPanels/ActionPanel.cs:119)
Opsive.UltimateInventorySystem.UI.Panels.ActionPanels.ActionPanel`1+<>c__DisplayClass13_0[T].<OpenInternal>b__0 () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ActionPanels/ActionPanel.cs:69)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.Press () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:72)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:123)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at D:/Dev/Tools/Unity/2020.3.3f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at D:/Dev/Tools/Unity/2020.3.3f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:262)
UnityEngine.EventSystems.EventSystem:Update() (at D:/Dev/Tools/Unity/2020.3.3f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:385)
It happens at the moment I choose the Equip action on the Item in the inventory.
My item definition has the proper prefabs. 1) the Prefab created for the item via the tutorial steps, and 2) a simple prefab that is just a game object with the 3d mesh for the drop visualization. I also went through the Item Binding steps using the Integrations window.
I've rewatched several times and am at a loss for what I'm missing and what could be null on what prefab. Any direction or places to look would be greatly appreciated. Hopefully, I'm just missing something and it's not a bug.