Arrary's inspector may cause misoperation

Issue #257 resolved
wavebit
created an issue

hello The draggable area should not cover the property area, it may cause misoperation, especially the nested data struct is deep and complex. Most time I am changing the property value not reordering it. as1.gif

Comments (5)

  1. wavebit reporter

    Sometimes it may cause remove some array item, then the editor catches many exceptions like below.

    ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint Aborting UnityEngine.GUILayoutGroup.GetNext () (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/LayoutGroup.cs:115) UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:299) UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:306) UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:293) Sirenix.Utilities.Editor.SirenixEditorGUI.BeginIndentedVertical (UnityEngine.GUILayoutOption[] options) (at C:/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/GUI/SirenixEditorGUI.cs:1285) Sirenix.OdinInspector.Editor.Drawers.CompositeDrawer.DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/CompositeDrawer.cs:32) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.NullableReferenceDrawer1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/NullableReferenceDrawer.cs:97) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.ReferenceValueConflictDrawer1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceValueConflictDrawer.cs:55) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.ReferencePathConflictDrawer1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferencePathConflictDrawer.cs:45) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (IPropertyValueEntry entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:149) Sirenix.OdinInspector.Editor.Drawers.FixUnityNullDrawer1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/FixUnityNullDrawer.cs:74) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.ReferenceDrawer1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceDrawer.cs:75) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (IPropertyValueEntry entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:149) Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/PropertyContextMenuDrawer.cs:33) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawPropertyImplementation (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.InspectorUtilities.DrawProperty (Sirenix.OdinInspector.Editor.InspectorProperty property, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:419) Rethrow as OdinPropertyException: This error occurred while being drawn by Odin. Odin Property Path: _unit._abilities.$1 Odin Drawer Chain: PropertyContextMenuDrawer<ScriptableObjectAbility>, ReferenceDrawer<ScriptableObjectAbility>, FixUnityNullDrawer<ScriptableObjectAbility>, ReferencePathConflictDrawer<ScriptableObjectAbility>, ReferenceValueConflictDrawer<ScriptableObjectAbility>, NullableReferenceDrawer<ScriptableObjectAbility>, CompositeDrawer. UnityEngine.Debug:LogException(Exception) Sirenix.OdinInspector.Editor.InspectorUtilities:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:460) Sirenix.OdinInspector.Editor.Drawers.ListDrawer2:DrawItem(ListDrawerConfigInfo, InspectorProperty, Boolean, Int32) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ListDrawer.cs:811) Sirenix.OdinInspector.Editor.Drawers.ListDrawer2:DrawItems(ListDrawerConfigInfo) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ListDrawer.cs:635) Sirenix.OdinInspector.Editor.Drawers.ListDrawer2:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ListDrawer.cs:243) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.NullableReferenceDrawer1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/NullableReferenceDrawer.cs:104) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.ReferenceValueConflictDrawer1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceValueConflictDrawer.cs:55) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.ReferencePathConflictDrawer1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferencePathConflictDrawer.cs:45) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(IPropertyValueEntry, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:149) Sirenix.OdinInspector.Editor.Drawers.FixUnityNullDrawer1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/FixUnityNullDrawer.cs:74) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:166) Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:121) Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:170) Sirenix.OdinInspector.Editor.Drawers.ReferenceDrawer1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceDrawer.cs:75) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawer<message truncated>

  2. Log in to comment