Error: The Item Definition cannot be created.

Kehaw

New member
1706664303547.png

Give item a name and click 'Add' button, console print stack:

Cannot create ItemDefinition with null or abstract Category
UnityEngine.Debug:LogWarning (object)
Opsive.UltimateInventorySystem.Core.ItemDefinition:Create (string,Opsive.UltimateInventorySystem.Core.ItemCategory,Opsive.UltimateInventorySystem.Core.ItemDefinition,System.Collections.Generic.IReadOnlyList`1<Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeBase>,System.Collections.Generic.IReadOnlyList`1<Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeBase>) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/ItemDefinition.cs:112)
Opsive.UltimateInventorySystem.Editor.Utility.ItemDefinitionEditorUtility:AddItemDefinition (string,Opsive.UltimateInventorySystem.Core.ItemCategory,Opsive.UltimateInventorySystem.Storage.InventorySystemDatabase,string) (at Assets/Opsive/UltimateInventorySystem/Editor/Utility/ItemDefinitionEditorUtility.cs:37)
Opsive.UltimateInventorySystem.Editor.Managers.ItemDefinitionManager:OnAdd (string) (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/ItemDefinitionManager.cs:433)
Opsive.UltimateInventorySystem.Editor.Managers.ListPanel`1<Opsive.UltimateInventorySystem.Core.ItemDefinition>:<.ctor>b__7_1 () (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/ListPanel.cs:57)
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

Error: The Item Definition cannot be created.
UnityEngine.Debug:LogError (object)
Opsive.UltimateInventorySystem.Editor.Utility.ItemDefinitionEditorUtility:AddItemDefinition (string,Opsive.UltimateInventorySystem.Core.ItemCategory,Opsive.UltimateInventorySystem.Storage.InventorySystemDatabase,string) (at Assets/Opsive/UltimateInventorySystem/Editor/Utility/ItemDefinitionEditorUtility.cs:39)
Opsive.UltimateInventorySystem.Editor.Managers.ItemDefinitionManager:OnAdd (string) (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/ItemDefinitionManager.cs:433)
Opsive.UltimateInventorySystem.Editor.Managers.ListPanel`1<Opsive.UltimateInventorySystem.Core.ItemDefinition>:<.ctor>b__7_1 () (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/ListPanel.cs:57)
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

When I click Item Category change button after I selected a category, nothing happenned.

1706664660504.png

Switch 'ItemDefinition Attributes' and 'Default Item Attributes' tab bar, console print errors like this:

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateInventorySystem.Editor.Managers.ItemDefinitionManager.GetAttributeCollection (System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/ItemDefinitionManager.cs:245)
Opsive.UltimateInventorySystem.Editor.Managers.ItemDefinitionManager.ShowAttributeTab (System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/ItemDefinitionManager.cs:226)
Opsive.Shared.Editor.UIElements.TabToolbar+<TabToolbar>c__AnonStorey0.<>m__0 () (at <c9e7e863283245faac2ba81b51b07b11>:0)
UnityEngine.UIElements.Clickable.Invoke (UnityEngine.UIElements.EventBase evt) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.Clickable.ProcessUpEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.Vector2 localPosition, System.Int32 pointerId) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.Clickable.OnMouseUp (UnityEngine.UIElements.MouseUpEvent evt) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <9b3502c626dd433da43ca50f8c32f6ba>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <db16a052c6a847e288adfa52e9195e65>:0)
 
Last edited:
Yes that's right, Uncategorized Category should not be changed. I'm sorry that wasn't clear.
I'm glad you found the solution to your issue :)
 
Top