Inventory manager blank screen

I've messed something up but have no idea what - everything was working fine but now when I try to open the Tools>Opsive>Ultimate Inventory System>Main Manager it is blank



And I get the following error


Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateInventorySystem.Core.Item.Equals (Opsive.UltimateInventorySystem.Core.Item other) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:760)
Opsive.UltimateInventorySystem.Core.Item.Equals (System.Object obj) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:745)
System.Object.Equals (System.Object objA, System.Object objB) (at <437ba245d8404784b9fbab9b439ac908>:0)
Opsive.UltimateInventorySystem.Core.DataStructures.ItemAmount.Equals (Opsive.UltimateInventorySystem.Core.DataStructures.ItemAmount other) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/DataStructures/ItemAmount.cs:101)
System.Collections.Generic.GenericEqualityComparer`1[T].Equals (T x, T y) (at <437ba245d8404784b9fbab9b439ac908>:0)
Opsive.UltimateInventorySystem.Core.AttributeSystem.Attribute`1[T].ReevaluateReturnValue (System.Boolean setAsPreEvaluated) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/Attribute.cs:289)
Opsive.UltimateInventorySystem.Core.AttributeSystem.Attribute`1[T].ReevaluateValue (System.Boolean setAsPreEvaluated) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/Attribute.cs:278)
Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeCollection.ReevaluateAll (System.Boolean setPreevaluate) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/AttributeCollection.cs:528)
Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeCollection.CreateNewAttributesIfMissing (Opsive.Shared.Utility.ListSlice`1[T] requiredAttributes) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/AttributeCollection.cs:271)
Opsive.UltimateInventorySystem.Core.AttributeSystem.AttributeCollection.UpdateAttributesToMatchList (Opsive.Shared.Utility.ListSlice`1[T] requiredAttributes, System.Boolean removeAdditionalAttributes) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/AttributeSystem/AttributeCollection.cs:230)
Opsive.UltimateInventorySystem.Core.ItemCategory.UpdateDefinitionAttributes () (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/ItemCategory.cs:322)
Opsive.UltimateInventorySystem.Editor.Managers.DatabaseValidator.CheckIfValid (Opsive.UltimateInventorySystem.Storage.InventorySystemDatabase database, System.Boolean autoFix) (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/DatabaseValidator.cs:141)
Opsive.UltimateInventorySystem.Editor.Managers.MainManagerWindow.ValidateDatabase () (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/MainManagerWindow.cs:475)
Opsive.UltimateInventorySystem.Editor.Managers.MainManagerWindow.OnEnable () (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/MainManagerWindow.cs:243)
UnityEditor.EditorWindow:GetWindow(Boolean, String)
Opsive.UltimateInventorySystem.Editor.Managers.MainManagerWindow:ShowWindow() (at Assets/Opsive/UltimateInventorySystem/Editor/Managers/MainManagerWindow.cs:122)


When I enter play mode i get the following 3 errors for each of my items





Code:
The item Shot Gun (365497693) Item Definition Shot Gun ID[1077542616] and or Item Category Single Item ID[2204504556] which are part of the active database. Please run the 'Replace Database Objects' script by right-clicking on the folder with the affected prefabs, scriptable objects, or scenes.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:AddItemCondition(ItemInfo) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:401)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:AddItem(ItemInfo, ItemStack) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:436)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:AddItem(Item, Int32) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:459)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:LoadDefaultLoadout() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:206)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:Initialize(IInventory, Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:159)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:InitializeItemCollectionArray() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:169)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:Initialize(Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:109)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:Awake() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:65)
)

Code:
The Opsive.UltimateInventorySystem.Core.ItemDefinition is not registered, yet it has a non-empty ID 2809060999.
UnityEngine.Debug:LogWarning(Object)
Opsive.UltimateInventorySystem.Core.Registers.InventoryObjectIDOnlyRegister`1:IsRegistered(ItemDefinition) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Registers/InventoryObjectRegister.cs:172)
Opsive.UltimateInventorySystem.Core.Registers.ItemRegister:RegisterConditions(Item) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Registers/ItemRegister.cs:59)
Opsive.UltimateInventorySystem.Core.Registers.ItemRegister:Register(Item&) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Registers/ItemRegister.cs:75)
Opsive.UltimateInventorySystem.Core.Item:Create(ItemDefinition, UInt32, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:128)
Opsive.UltimateInventorySystem.Core.Item:Create(Item, UInt32, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:167)
Opsive.UltimateInventorySystem.Core.Item:Create(Item, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:143)
Opsive.UltimateInventorySystem.Core.InventorySystemFactory:CreateItem(Item, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventorySystemFactory.cs:116)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:DuplicateItem(Item) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:175)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:LoadDefaultLoadout() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:206)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:Initialize(IInventory, Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:159)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:InitializeItemCollectionArray() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:169)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:Initialize(Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:109)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:Awake() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:65)

Code:
The Item Definition of the Item is not registered.
UnityEngine.Debug:LogWarning(Object)
Opsive.UltimateInventorySystem.Core.Registers.ItemRegister:RegisterConditions(Item) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Registers/ItemRegister.cs:60)
Opsive.UltimateInventorySystem.Core.Registers.ItemRegister:Register(Item&) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Registers/ItemRegister.cs:75)
Opsive.UltimateInventorySystem.Core.Item:Create(ItemDefinition, UInt32, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:128)
Opsive.UltimateInventorySystem.Core.Item:Create(Item, UInt32, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:167)
Opsive.UltimateInventorySystem.Core.Item:Create(Item, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/Item.cs:143)
Opsive.UltimateInventorySystem.Core.InventorySystemFactory:CreateItem(Item, IReadOnlyList`1) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventorySystemFactory.cs:116)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:DuplicateItem(Item) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:175)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:LoadDefaultLoadout() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:206)
Opsive.UltimateInventorySystem.Core.InventoryCollections.ItemCollection:Initialize(IInventory, Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/ItemCollection.cs:159)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:InitializeItemCollectionArray() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:169)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:Initialize(Boolean) (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:109)
Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory:Awake() (at Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:65)
 
Last edited:
I'm sorry, this seems like a bug that's pretty problematic.

For now could you open the Item.cs file and add the following on line 760:
C#:
if (Category != other.Category) { return false; }
if (Category == null || other.Category == null) { return false;}
if (ItemDefinition != other.ItemDefinition) { return false; }
if (ItemDefinition == null || other.ItemDefinition == null) { return false;}

before the line using ItemDefinition.IsMutable.

Normally Items should always be initialized and therefore have an ItemDefinition, but it is possible that you deleted an item definition while an item from that definition is referenced by another item definition creating this corrupt state.

Please do let me know if the code change above fixes the issue or if there are other problems popping up in other places
 
As for your runtime errors, they should be fixed once you fix the database.

If not, make sure you are referencing the correct database in your scene and that you are not referencing definition and categories from another database.
 
I'm sorry, this seems like a bug that's pretty problematic.

For now could you open the Item.cs file and add the following on line 760:
C#:
if (Category != other.Category) { return false; }
if (Category == null || other.Category == null) { return false;}
if (ItemDefinition != other.ItemDefinition) { return false; }
if (ItemDefinition == null || other.ItemDefinition == null) { return false;}

before the line using ItemDefinition.IsMutable.

Normally Items should always be initialized and therefore have an ItemDefinition, but it is possible that you deleted an item definition while an item from that definition is referenced by another item definition creating this corrupt state.

Please do let me know if the code change above fixes the issue or if there are other problems popping up in other places

Excellent it worked.

Also, I tried to replicate what I did in a new project and it was exactly what you described. I deleted an item definition from one area but not the others and closed the editor and when I opened it again it was blank.

Thanks for the fix
 
Thank you confirming my suspicion, the fix will be available in the next UIS update with other bug fixes
 
Top