BUG? State Inspector Helper Game Objects Appearing

The error that you are receiving is the cause. What is null on 536 of ItemSetManagerBaseInspector? If you do an EditorPrefs.DeleteAll does it fix the issue?
I didn't change anything in the demo scene, other than set up URP. I just click on Nolan and it starts spamming.
Removing this line (470) fixes the issue though.
C#:
                m_ReorderableItemSetStateList[m_ItemSetListIndex].index = -1;

+1 I have the same issue. Regardless of pipeline. I figure it has to do with unity screwing up the reorderable lists, yet again
It must be. Scrolling through inspector with large size reorderable lists (such as that in the demo character) is also painfully choppy on both 2021.3 and 2022.1, a lot slower than on 2020.3LTS. I guess I'll stay on that one for now.
 
This bug is happening in 2021.3.6f1 with 2.4.8 of the character controller. In my case, it happened when I deleted all of the default loadout items on one of my characters by mistake, and then pressed undo to rectify the mistake. Then all of a sudden, the ItemSetManagerBaseInspector started throwing NullReferences and StateInspectorHelpers started spawning whenever I had my character in the Inspector. Rather bizarre. It's worth noting that Unity did fix a bug in 2021.3.6f1 with regards to custom lists in the Inspector, I'm not sure if this could be related.
 
I have the same problem

1. Character controller variant : Ultimate Character Controller 2.4.8
2. Unity version 2021.3.8f1


when I expand this option, then auto create empty object every second, if click again in the arrow stop the creation of objects

1660529307191.png

Show when is expanded
1660529948044.png


This options have the new game object created

1660529443385.png


This is the log

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Editor.Inspectors.Inventory.ItemSetManagerBaseInspector.OnItemSetStateListDraw (UnityEngine.Rect rect, System.Int32 index, System.Boolean isActive, System.Boolean isFocused) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Inventory/ItemSetManagerBaseInspector.cs:470)
 
If you add a null check to that line the error should go away:

Code:
if (m_ReorderableItemSetStateList != null && m_ReorderableItemSetStateList.Length > m_ItemSetListIndex) {
 
Code:
if (m_ReorderableItemSetStateList != null && m_ReorderableItemSetStateList.Length > m_ItemSetListIndex) {

The error not go away,

I try add this another validation and is working

C#:
m_ReorderableItemSetStateList[m_ItemSetListIndex] != null

the final code

C#:
if (m_ReorderableItemSetStateList != null && m_ReorderableItemSetStateList[m_ItemSetListIndex] != null && m_ReorderableItemSetStateList.Length > m_ItemSetListIndex) {
                    m_ReorderableItemSetStateList[m_ItemSetListIndex].index = -1;
                }
 
i have this issue in a fresh unity install, fresh project and using version 2.4.8.

i get this issue with a created character and a weapon applied.
 
I didn't change anything in the demo scene, other than set up URP. I just click on Nolan and it starts spamming.
Removing this line (470) fixes the issue though.
C#:
                m_ReorderableItemSetStateList[m_ItemSetListIndex].index = -1;


It must be. Scrolling through inspector with large size reorderable lists (such as that in the demo character) is also painfully choppy on both 2021.3 and 2022.1, a lot slower than on 2020.3LTS. I guess I'll stay on that one for now.
Commenting out that Line Fixed the error for me.


I have the same problem

1. Character controller variant : Ultimate Character Controller 2.4.8
2. Unity version 2021.3.8f1


when I expand this option, then auto create empty object every second, if click again in the arrow stop the creation of objects

View attachment 9431

Show when is expanded
View attachment 9434


This options have the new game object created

View attachment 9433


This is the log

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Editor.Inspectors.Inventory.ItemSetManagerBaseInspector.OnItemSetStateListDraw (UnityEngine.Rect rect, System.Int32 index, System.Boolean isActive, System.Boolean isFocused) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Inventory/ItemSetManagerBaseInspector.cs:470)

I had the same exact issue. Commenting out the line Fixed it thou.
 
The error not go away,

I try add this another validation and is working

C#:
m_ReorderableItemSetStateList[m_ItemSetListIndex] != null

the final code

C#:
if (m_ReorderableItemSetStateList != null && m_ReorderableItemSetStateList[m_ItemSetListIndex] != null && m_ReorderableItemSetStateList.Length > m_ItemSetListIndex) {
                    m_ReorderableItemSetStateList[m_ItemSetListIndex].index = -1;
                }

This fixed for me.

I fixed before, but updated to the last version 2.4.9 and the bug was reintroduced.
 
Im also having this issue. When you select the player many game objects appear.
 

Attachments

  • weird error.PNG
    weird error.PNG
    990.7 KB · Views: 5
I did a reimport all. Then restored an older repository and reinstalled Unity after deleting the library. That didnt work, but commenting out line 470 as mentioned above worked a charm. Thanks!
 
I currently have this issue in 3.0.8 (had it in 3.0.6 as well). Not really sure on how to proceed with a fix and im not confortable editing Opsive scripts to much!
 
Top