Cheo
Active member
Hello, I finally decided to delve into UIS, but only 2 minutes into the demo scene I stumbled upon a bug - when interacting with the blacksmith I get a null reference exception, here's the stack and source :
I just downloaded UIS so it's the latest version, 1.12.18. I'm using Unity 2022.3.8f1.
As I've already said for issues in other demo scenes, this is really a shame, when I start a demo scene I'm expecting to have a good example and to be able to play around with the asset, not to have to write a bug report just a few minutes after installing the asset ! Hope you can fix this, I'll see if I can figure this out already.
Code:
[Exception] NullReferenceException: Object reference not set to an instance of an object
CraftingMenuBase+MultiCraftingRecipeFilterSorter.Filter() at /Opsive/UltimateInventorySystem/Scripts/UI/Menus/Crafting/CraftingMenuBase.cs:300
298: for (int i = 0; i < m_GridFilters.Count; i++) {
299: if(m_GridFilters[i] == this){ continue; }
--> 300: list = m_GridFilters[i].Filter(list, ref outputPooledArray);
301: }
Opsive.UltimateInventorySystem.UI.Grid.GridGeneric`1[T].SetElements() at /Opsive/UltimateInventorySystem/Scripts/UI/Grid/GridGeneric.cs:353
351: if (ignoreSorterFilter == false && m_FilterSorter != null) {
352: var pooledArray = GenericObjectPool.Get<T[]>();
--> 353: newElements = m_FilterSorter.Filter(newElements, ref pooledArray);
354: GenericObjectPool.Return(pooledArray);
355: }
CraftingMenuBase.DrawRecipes() at /Opsive/UltimateInventorySystem/Scripts/UI/Menus/Crafting/CraftingMenuBase.cs:124
122: public virtual void DrawRecipes()
123: {
--> 124: m_CraftingRecipeGrid.SetElements(m_Crafter.GetRecipes());
125: m_CraftingRecipeGrid.Draw();
126: }
CraftingMenuBase.SetCrafter() at /Opsive/UltimateInventorySystem/Scripts/UI/Menus/Crafting/CraftingMenuBase.cs:116
114: m_Crafter = crafter;
115: m_Crafter.Initialize(false);
--> 116: DrawRecipes();
117: }
CraftingMenuOpener.Open() at /Opsive/UltimateInventorySystem/Scripts/UI/Menus/CraftingMenuOpener.cs:32
30: {
31: m_Menu.BindInventory(inventory);
--> 32: m_Menu.SetCrafter(m_Crafter);
33: m_Menu.DisplayPanel.SmartOpen();
34: }
MenuInteractableBehavior.OnInteractInternal() at /Opsive/UltimateInventorySystem/Scripts/UI/Panels/MenuInteractableBehavior.cs:37
35: m_MenuOpener.ChangePanelManagerIndex(interactorWithInventory.Inventory.gameObject.GetCachedComponent<InventoryIdentifier>().ID);
36: }
--> 37: m_MenuOpener.Open(interactorWithInventory.Inventory);
38: }
39: }
InteractableBehavior.OnInteract() at /Opsive/UltimateInventorySystem/Scripts/Interactions/InteractableBehavior.cs:100
98: public virtual void OnInteract(IInteractor interactor)
99: {
--> 100: OnInteractInternal(interactor);
102: if (!m_DeactivateOnInteract) { return; }
Opsive.Shared.Events.InvokableAction`1[T1].Invoke() at <52329c5bb9d24a17aa3c9cbeab267298>:0
EventHandler.ExecuteEvent[T1]() at <52329c5bb9d24a17aa3c9cbeab267298>:0
Interactable.Interact() at /Opsive/UltimateInventorySystem/Scripts/Interactions/Interactable.cs:180
179: m_OnInteract.Invoke();
--> 180: EventHandler.ExecuteEvent<IInteractor>(gameObject, EventNames.c_Interactable_OnInteract_IInteractor, interactor);
181: return true;
182: }
InventoryInteractor.InteractWith() at /Opsive/UltimateInventorySystem/Scripts/Interactions/InventoryInteractor.cs:163
161: protected virtual void InteractWith(IInteractable interactable)
162: {
--> 163: interactable.Interact(this);
164: }
InventoryInteractor.Interact() at /Opsive/UltimateInventorySystem/Scripts/Interactions/InventoryInteractor.cs:112
110: {
111: if (m_Interactables.Count > 0) {
--> 112: InteractWith(m_Interactables[0]);
113: }
114: }
InventoryInteractor.Update() at /Opsive/UltimateInventorySystem/Scripts/Interactions/InventoryInteractor.cs:102
101: if (m_Input.CheckInput(m_PlayerInput)) {
--> 102: Interact();
103: }
104: }
I just downloaded UIS so it's the latest version, 1.12.18. I'm using Unity 2022.3.8f1.
As I've already said for issues in other demo scenes, this is really a shame, when I start a demo scene I'm expecting to have a good example and to be able to play around with the asset, not to have to write a bug report just a few minutes after installing the asset ! Hope you can fix this, I'll see if I can figure this out already.