Arrary's inspector may cause misoperation
Issue #257
resolved
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.
Comments (5)
-
reporter -
- changed status to open
Thanks, I'm looking into this.
In the meanwhile, you could use the TableList attribute.
-
reporter TableList uses too much screen space and it has a bug shown below.
-
Ah yeah, so I see. That bug should be fixed btw. It's the label width that forces things to expand.
-
- changed status to resolved
List elements are now only draggable via the drag handle.
- Log in to comment
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.NullableReferenceDrawer
1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry
1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/NullableReferenceDrawer.cs:97) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry
1 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.ReferenceValueConflictDrawer
1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceValueConflictDrawer.cs:55) Sirenix.OdinInspector.Editor.OdinValueDrawer
1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer
1[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 (IPropertyValueEntry
1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferencePathConflictDrawer.cs:45) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry
1 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.FixUnityNullDrawer
1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/FixUnityNullDrawer.cs:74) Sirenix.OdinInspector.Editor.OdinValueDrawer
1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer
1[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 (IPropertyValueEntry
1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceDrawer.cs:75) Sirenix.OdinInspector.Editor.OdinValueDrawer1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry
1 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.PropertyContextMenuDrawer
1[ScriptableObjectAbility].DrawPropertyLayout (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/PropertyContextMenuDrawer.cs:33) Sirenix.OdinInspector.Editor.OdinValueDrawer
1[ScriptableObjectAbility].DrawProperty (IPropertyValueEntry1 entry, UnityEngine.GUIContent label) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer
1[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.ListDrawer
2:DrawItems(ListDrawerConfigInfo) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ListDrawer.cs:635) Sirenix.OdinInspector.Editor.Drawers.ListDrawer2:DrawPropertyLayout(IPropertyValueEntry
1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ListDrawer.cs:243) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry
1, 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.NullableReferenceDrawer
1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/NullableReferenceDrawer.cs:104) Sirenix.OdinInspector.Editor.OdinValueDrawer
1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer
1: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(IPropertyValueEntry
1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceValueConflictDrawer.cs:55) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry
1, 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.ReferencePathConflictDrawer
1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferencePathConflictDrawer.cs:45) Sirenix.OdinInspector.Editor.OdinValueDrawer
1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer
1: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(IPropertyValueEntry
1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/FixUnityNullDrawer.cs:74) Sirenix.OdinInspector.Editor.OdinValueDrawer1:DrawProperty(IPropertyValueEntry
1, 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.ReferenceDrawer
1:DrawPropertyLayout(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceDrawer.cs:75) Sirenix.OdinInspector.Editor.OdinValueDrawer
1:DrawProperty(IPropertyValueEntry1, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinValueDrawer.cs:175) Sirenix.OdinInspector.Editor.OdinValueDrawer
1:DrawPropertyImplementation(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawer<message truncated>