OverflowException sometimes

finaratic

Member
OverflowException: Value was either too large or too small for an Int32.
System.Convert.ThrowInt32OverflowException () (at <694551e795764b938030a3128fac2b36>:0)
System.Convert.ToInt32 (System.UInt32 value) (at <694551e795764b938030a3128fac2b36>:0)
System.UInt32.System.IConvertible.ToInt32 (System.IFormatProvider provider) (at <694551e795764b938030a3128fac2b36>:0)
System.Convert.ToInt32 (System.Object value) (at <694551e795764b938030a3128fac2b36>:0)
BehaviorDesigner.Editor.FieldInspector.DrawSingleField (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo fieldInfo, System.Type fieldType, System.Object value) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.FieldInspector.DrawField (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo fieldInfo, System.Type fieldType, System.Object value) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.FieldInspector.DrawField (BehaviorDesigner.Runtime.Tasks.Task task, UnityEngine.GUIContent guiContent, System.Reflection.FieldInfo field, System.Object value) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.FieldInspector.DrawFields (BehaviorDesigner.Runtime.Tasks.Task task, System.Object obj, UnityEngine.GUIContent guiContent) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.VariableInspector.DrawSharedVariable (BehaviorDesigner.Runtime.IVariableSource variableSource, BehaviorDesigner.Runtime.SharedVariable sharedVariable, System.Boolean selected) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.VariableInspector.DrawAllVariables (System.Boolean showFooter, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Collections.Generic.List`1[BehaviorDesigner.Runtime.SharedVariable]& variables, System.Boolean canSelect, System.Collections.Generic.List`1[System.Single]& variablePosition, System.Int32& selectedVariableIndex, System.String& selectedVariableName, System.Int32& selectedVariableTypeIndex, System.Boolean drawRemoveButton, System.Boolean drawLastSeparator) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.BehaviorInspector.DrawInspectorGUI (BehaviorDesigner.Runtime.Behavior behavior, UnityEditor.SerializedObject serializedObject, System.Boolean fromInspector, System.Boolean& externalModification, System.Boolean& showOptions, System.Boolean& showVariables) (at <39ca2654c2db4185982f842e4cf3e147>:0)
BehaviorDesigner.Editor.BehaviorInspector.OnInspectorGUI () (at <39ca2654c2db4185982f842e4cf3e147>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <eac5a53e351648a39069580eee68e787>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
 
During runtime when bot run around and i select behavior designer window i dont see anything there and i get more issues
 

Attachments

  • 1738852048314.png
    1738852048314.png
    49.1 KB · Views: 2
  • 1738852055876.png
    1738852055876.png
    85.9 KB · Views: 2
This is likely related to the change that I sent you earlier. If you test a fresh project does it display correct?
 
This is caused by the uint. Unity's IMGUI doesn't have a uint field and the range is outside the bounds. A quick way to fix this is to manually assign the category ID to a value less than int.MaxValue. You will need to make sure you assign this value to the category ScriptableObject.

It's not the cleanest method, but it'll work until I update the Deathmatch AI Kit to use Behavior Designer Pro which can handle uint because of VisualElements.
 
This is caused by the uint. Unity's IMGUI doesn't have a uint field and the range is outside the bounds. A quick way to fix this is to manually assign the category ID to a value less than int.MaxValue. You will need to make sure you assign this value to the category ScriptableObject.

It's not the cleanest method, but it'll work until I update the Deathmatch AI Kit to use Behavior Designer Pro which can handle uint because of VisualElements.
Thanks! So basically just update category ID of items category in debug unity inspector window right?
 
Yes, that's correct. I have this fixed in the UIElements version of Behavior Designer Pro. I'll eventually be updating deathmatch to that version.
 
Back
Top