Null ref when adding items

7Dev

New member
I'm having issues adding items to my character. I keep getting

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Items.CharacterItem.IsActive () (at Assets/Opsive/UltimateCharacterController/Scripts/Items/CharacterItem.cs:730)
Opsive.UltimateCharacterController.Character.ItemHandler.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/ItemHandler.cs:70)

I made a new project to test it. I created a new character using the Atlas model in FP/3rdp view and made some custom items, when I add the items to it the same null ref issue happens, it happens even if I add the default demo items to the custom Atlas. The og character Atlas from the demo works fine with his old items but if I add the new items he too has the same issue. I'm using the full UCC.
 
Last edited:
It looks like your character is configured for a both perspective but your item is only setup for a first person perspective. Make sure when you are creating the item you also add the third person visible item.
 
It looks like your character is configured for a both perspective but your item is only setup for a first person perspective. Make sure when you are creating the item you also add the third person visible item.
Thanks for the quick reply Justin but I'm still having the issue after doing that. Can you have a look at this video and see if you can figure out what I am doing wrong?



Also, I'm trying to make the 2 perspectives work like in Star Citizen, like the camera changes position, but everything remains the same: animations, meshes, gameobjects. Is there a way for me to use the third-person item in both perspectives? I don't have FPS hands or anything just need it to stay visible and no system errors?
 
Last edited:
Also, I'm trying to make the 2 perspectives work like in Star Citizen, like the camera changes position, but everything remains the same: animations, meshes, gameobjects. Is there a way for me to use the third-person item in both perspectives? I don't have FPS hands or anything just need it to stay visible and no system errors?
Ahh, that may be the cause. It looks like your item is correct now but since you don't have dedicated first person arms you are getting the null reference. I will improve the error message in the next version.

Take a look at this page for your question: https://opsive.com/support/document...troller/animation/animator/first-person-arms/
 
Top