Missing reference

nathanj

Active member
Hey, sorry for all the questions again, and this one is a bit lame but I'm a bit lost atm.

I duplicated the body item type from the demo scene and added it to my player and it's mostly working but I am getting two errors I can not figure out. You mind pointing me in the right direction?

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Inventory.ItemSet.StateChange () (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSet.cs:180)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.InventoryItemSetManager.StateChange () (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/ItemSet/InventoryItemSetManager.cs:722)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.BridgeEquippableProcessing.UpdateItemSetItems (System.Boolean equip) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/BridgeEquippableProcessing.cs:472)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.BridgeEquippableProcessing.OnItemAddedToEquippable (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, Opsive.UltimateInventorySystem.Core.DataStructures.ItemStack addedItemStack) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/BridgeEquippableProcessing.cs:196)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.BridgeEquippableProcessing.LoadDefaultLoadout () (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/BridgeEquippableProcessing.cs:823)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge.LoadDefaultLoadout () (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:562)
Opsive.UltimateCharacterController.Inventory.InventoryBase.Start () (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:122)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge.Start () (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:151)

and

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Inventory.ItemSet.OnUpdateItemSet (System.Int32 categoryIndex, System.Int32 itemSetIndex) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSet.cs:204)
Opsive.Shared.Events.InvokableAction`2[T1,T2].Invoke (T1 arg1, T2 arg2) (at <27da9e1afec54f2fb2a11d46a234f9df>:0)
Opsive.Shared.Events.EventHandler.ExecuteEvent[T1,T2] (System.Object obj, System.String eventName, T1 arg1, T2 arg2) (at <27da9e1afec54f2fb2a11d46a234f9df>:0)
Opsive.UltimateCharacterController.Inventory.ItemSetManagerBase.UpdateActiveItemSet (System.Int32 categoryIndex, System.Int32 itemSetIndex) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSetManagerBase.cs:897)
Opsive.UltimateCharacterController.Character.Abilities.Items.EquipUnequip.ItemEquip (System.Int32 slotID, System.Boolean canUpdate) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/EquipUnequip.cs:1018)
Opsive.Shared.Game.SchedulerBase.AddEventInternal[T,U] (System.Single delay, Opsive.Shared.Game.ScheduledEventBase+InvokeLocation invokeLocation, System.Action`2[T1,T2] action, T value1, U value2) (at <30943c6321fb4a8cbbf1f4853f76af59>:0)
Opsive.Shared.Game.SchedulerBase.ScheduleFixed[T,U] (System.Single delay, System.Action`2[T1,T2] action, T value1, U value2) (at <30943c6321fb4a8cbbf1f4853f76af59>:0)
Opsive.UltimateCharacterController.Character.Abilities.Items.EquipUnequip.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/EquipUnequip.cs:644)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:794)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.Start () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:686)

Thank you,
 
Edit, I just realised I need to make the item myself and so all the references are added to the inventoryDatatbase I am using.

What a goof I am ;)
 
Top