ItemSetManager error

ekvilon

New member
Hi there!

I have created custom melee wand weapon with custom animations and did all steps from videos to add that weapon (item type, item and so on).
When I am in play mode weapon rendering and idle/aim (I replaced standard animations) animation works fine.
When I hit fire idle animation is playing and in console I got:
Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Inventory.ItemSetManagerBase.GetEquipItemIdentifier (System.Int32 categoryIndex, System.Int32 slot) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSetManagerBase.cs:815)
after this happens idle animation is playing only.

What I am doing wrong? Please help.
Thanks in advance.
 
So, without more details what I can think of to check:

Is the ItemType set on the Player in the ItemSetManager?

1590908617101.png

... and uses the same SlotId (Slot0 [right hand] in this case) as the Item script for that weapon:

1590908772482.png

It'd start there.

Make sure to also check you're using a valid AnimatorItemID.

Looking at other attack animations, I see they have this animation event:

1590909448388.png

Make sure your replacement animations also have this event.

Anyways, this' the offending Line#815:

Code:
if (categoryIndex == -1 || categoryIndex >= m_CategoryItemSets.Length || slot == -1 || slot >= m_Inventory.SlotCount) {

... guess it's either unable to find m_CategoryItemSets or m_Inventory (InventoryBase)

If that's not the issue canya give us some more details into what you're tryin to accomplish and when exactly this happens?
 
Last edited:
Hi ekvilon, have you managed to have a look at the suggestions in SteveC's excellent response? Let us know if you come across any more issues :)
 
So, without more details what I can think of to check:

Is the ItemType set on the Player in the ItemSetManager?

View attachment 3092

... and uses the same SlotId (Slot0 [right hand] in this case) as the Item script for that weapon:

View attachment 3093

It'd start there.

Make sure to also check you're using a valid AnimatorItemID.

Looking at other attack animations, I see they have this animation event:

View attachment 3095

Make sure your replacement animations also have this event.

Anyways, this' the offending Line#815:

Code:
if (categoryIndex == -1 || categoryIndex >= m_CategoryItemSets.Length || slot == -1 || slot >= m_Inventory.SlotCount) {

... guess it's either unable to find m_CategoryItemSets or m_Inventory (InventoryBase)

If that's not the issue canya give us some more details into what you're tryin to accomplish and when exactly this happens?
Thank you so much. Your answer helped me a lot to figure out what was wrong.
 
Top