"GUI Error: Invalid GUILayout state in OdinEditorWindow view. Verify that all layout Begin/End calls match" Exception when opening foldout group
- Unity outputs exception “GUI Error: Invalid GUILayout state in OdinEditorWindow view. Verify that all layout Begin/End calls match” (full stack trace attached)
-
Opening a foldout group for a field on an element in an array in an Odin Editor Window.
-
Scriptable Object asset is opened using
Sirenix.OdinInspector.Editor.OdinEditorWindow.InspectObject(Selection.activeObject);
-
Scriptable Object has an array of serializable elements. The array has the following attributes:
[TableList(HideToolbar = false, ShowPaging = true)] [Searchable(Recursive = false)] [ListDrawerSettings(DraggableItems = false)] [OnCollectionChanged.. [ValidateInput..
-
-
One of the fields on one of these serializable elements with an
InlineEditorAttribute
is expanded (as shown by arrow in screenshot below)-
Field has the following attributes:
[InlineEditor] [TableColumnWidth(500)]
2. Field is class that extends a Scriptable Object with many other fields in it. Fields have many Odin attributes and many are also Serializable classes that contain many Odin attributes on their fields:[InlineProperty] [HideLabel] [ValueDropdown.. [CustomContextMenu.. [ShowIf.. [ValidateInput.. [HorizontalGroup.. [EnableIf.. [MinMaxSlider..
-
-
-
Screenshots:
- Screenshot for 2. b.
4. 2021.3.7f1
5. 3.1.3.0 (was also reproduced on 3.0.13)
6. No
7. Windows 10 Pro
Comments (1)
-
reporter - Log in to comment
Note: this exception only occurs in the
OdinEditorWindow
, when performing the same steps in a regular Unity Inspector window, no exception occurs when expanding the Foldout Group associated with that[InlineEditor]
attribute.