[Bug] Inspector can't display Start Item Set Ability correctly

Cheo

Active member
When clicking on the Start Item Set Ability with any other tab than Inspector open nothing goes wrong, but when clicking on Inspector the right side of the Behavior Designer window was filled with gray like this :

Capture d’écran (501).png

Here are the error logs form Console Pro if that helps :

Capture d’écran (502).png

Capture d’écran (503).png

Capture d’écran (504).png



Capture d’écran (505).png



In addition you can see that a third variable is missing, there's only the magnifying glass icon.

This error occured on my main project using 2022.2.5f1 and the latest versions of UCC and BD. I tried replicating the same issue on a test project with 2022.2.7f1, it initially led to the same errors but for some reason it disappeared shortly after and I could select the inspector tab with no gui issues. The third variable was still missing however.
I actually don't nned this task in my tree right now but this needs to be fixed nonetheless, I'm available for more tests if necessary. Thanks in advance.
 
What is the stack trace? I am not able to reproduce that error with StartEquipUnequip. The error from the first post was caused by something within the character controller so as long as you are on 3.0.8 then you shouldn't be getting the error.
 
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Inventory.ItemSetGroup.get_CategoryName () (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSetGroup.cs:70)
BehaviorDesigner.Editor.UltimateCharacterController.ObjectDrawers.ItemSetCategoryDrawer.OnGUI (UnityEngine.GUIContent label) (at Assets/Behavior Designer/Integrations/UltimateCharacterController/Editor/UltimateCharacterControllerDrawers.cs:80)
BehaviorDesigner.Editor.FieldInspector.DrawSharedVariable (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo fieldInfo, System.Type fieldType, BehaviorDesigner.Runtime.SharedVariable sharedVariable) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawSharedVariableValue (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Reflection.FieldInfo field, UnityEngine.GUIContent guiContent, BehaviorDesigner.Runtime.Tasks.Task task, BehaviorDesigner.Runtime.SharedVariable sharedVariable, System.Boolean isReflectionTask, System.Boolean enabled, System.Boolean drawWatch) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawObjectFields (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, BehaviorDesigner.Editor.TaskList taskList, BehaviorDesigner.Runtime.Tasks.Task task, System.Object obj, System.Boolean enabled, System.Boolean drawWatch) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawTaskFields (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, BehaviorDesigner.Editor.TaskList taskList, BehaviorDesigner.Runtime.Tasks.Task task, System.Boolean enabled) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawTaskInspector (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, BehaviorDesigner.Editor.TaskList taskList, BehaviorDesigner.Runtime.Tasks.Task task, System.Boolean enabled) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.DrawPropertiesBox () (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.Draw () (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.OnGUI () (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:464)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:386)
UnityEditor.DockArea.OldOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:377)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:372)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:693)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:665)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:658)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:618)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:607)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/IEventDispatchingStrategy.cs:113)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:35)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:26)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:19)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:381)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:306)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:270)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:75)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:372)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs:420)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:468)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:211)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
 
An Inventory component is required for an ItemSetManager.
UnityEngine.Debug:LogError (object)
Opsive.UltimateCharacterController.Inventory.ItemSetManagerBase:Initialize (bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSetManagerBase.cs:94)
Opsive.UltimateCharacterController.Inventory.ItemSetManager:Initialize (bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSetManager.cs:34)
BehaviorDesigner.Editor.UltimateCharacterController.ObjectDrawers.ItemSetCategoryDrawer:OnGUI (UnityEngine.GUIContent) (at Assets/Behavior Designer/Integrations/UltimateCharacterController/Editor/UltimateCharacterControllerDrawers.cs:69)
BehaviorDesigner.Editor.FieldInspector:DrawSharedVariable (BehaviorDesigner.Runtime.Tasks.Task,UnityEngine.GUIContent,System.Reflection.FieldInfo,System.Type,BehaviorDesigner.Runtime.SharedVariable)
BehaviorDesigner.Editor.TaskInspector:DrawSharedVariableValue (BehaviorDesigner.Runtime.BehaviorSource,System.Reflection.FieldInfo,UnityEngine.GUIContent,BehaviorDesigner.Runtime.Tasks.Task,BehaviorDesigner.Runtime.SharedVariable,bool,bool,bool)
BehaviorDesigner.Editor.TaskInspector:DrawObjectFields (BehaviorDesigner.Runtime.BehaviorSource,BehaviorDesigner.Editor.TaskList,BehaviorDesigner.Runtime.Tasks.Task,object,bool,bool)
BehaviorDesigner.Editor.TaskInspector:DrawTaskFields (BehaviorDesigner.Runtime.BehaviorSource,BehaviorDesigner.Editor.TaskList,BehaviorDesigner.Runtime.Tasks.Task,bool)
BehaviorDesigner.Editor.TaskInspector:DrawTaskInspector (BehaviorDesigner.Runtime.BehaviorSource,BehaviorDesigner.Editor.TaskList,BehaviorDesigner.Runtime.Tasks.Task,bool)
BehaviorDesigner.Editor.BehaviorDesignerWindow:DrawPropertiesBox ()
BehaviorDesigner.Editor.BehaviorDesignerWindow:Draw ()
BehaviorDesigner.Editor.BehaviorDesignerWindow:OnGUI ()
UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
 
That looks like a different error:

An Inventory component is required for an ItemSetManager.

Do you have the inventory component added? If so, can you set a breakpoint within the Initialize method and see why it can't find the inventory component?
 
When I changed m_Inventory = m_GameObject.GetCachedComponent<InventoryBase>();
as m_Inventory = m_GameObject.GetComponent<InventoryBase>(); in ItemSetManagerBase.
it resolved.
Thanks.
 
On the Start Item Set Ability there is another issue:
OverflowException: Value was either too large or too small for an Int32.
System.Convert.ThrowInt32OverflowException () (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
System.Convert.ToInt32 (System.UInt32 value) (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
System.UInt32.System.IConvertible.ToInt32 (System.IFormatProvider provider) (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
System.Convert.ToInt32 (System.Object value) (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
BehaviorDesigner.Editor.FieldInspector.DrawSingleField (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo fieldInfo, System.Type fieldType, System.Object value) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.FieldInspector.DrawField (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo fieldInfo, System.Type fieldType, System.Object value) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.FieldInspector.DrawField (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo field, System.Object value) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.FieldInspector.DrawFields (BehaviorDesigner.Runtime.Tasks.Task task, System.Object obj, UnityEngine.GUIContent guiContent) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.FieldInspector.DrawSharedVariable (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo fieldInfo, System.Type fieldType, BehaviorDesigner.Runtime.SharedVariable sharedVariable) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawSharedVariableValue (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Reflection.FieldInfo field, UnityEngine.GUIContent guiContent, BehaviorDesigner.Runtime.Tasks.Task task, BehaviorDesigner.Runtime.SharedVariable sharedVariable, System.Boolean isReflectionTask, System.Boolean enabled, System.Boolean drawWatch) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawObjectFields (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, BehaviorDesigner.Editor.TaskList taskList, BehaviorDesigner.Runtime.Tasks.Task task, System.Object obj, System.Boolean enabled, System.Boolean drawWatch) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawTaskFields (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, BehaviorDesigner.Editor.TaskList taskList, BehaviorDesigner.Runtime.Tasks.Task task, System.Boolean enabled) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.TaskInspector.DrawTaskInspector (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, BehaviorDesigner.Editor.TaskList taskList, BehaviorDesigner.Runtime.Tasks.Task task, System.Boolean enabled) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.DrawPropertiesBox () (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.Draw () (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.OnGUI () (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:464)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:386)
UnityEditor.DockArea.OldOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:377)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:351)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
 
I just tried Start Item Set Ability and am also not getting any errors. Have you tried this in a fresh project with the integration scene to see if you get the same errors?
 
Hmm, that error indicates that an int is too large or small of a value. Is this your own behavior tree? If you enable JSON serialization can you determine what int is too small or big? Alternatively if you delete and add the task back then it should reset the value.
 
Top