dmitry-ivashenko / StatefulUI

Stateful UI - A library for structured state-based UI development in Unity
MIT License
304 stars 22 forks source link

StateEditor.cs 40 line causing "ArgumentException: Getting control 1's position..." #2

Closed hermer29 closed 2 months ago

hermer29 commented 1 year ago

Describe the bug

StateEditor.cs 40 line causing "ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint Aborting UnityEngine.GUILayoutGroup.GetNext () (at <82a3a4e0a0a94de5afddd345f6cf50d1>:0) UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at <82a3a4e0a0a94de5afddd345f6cf50d1>:0) UnityEditor.EditorGUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at :0) UnityEditor.EditorGUILayout.BeginVertical (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at :0) StatefulUI.Editor.ReferenceInspectors.StateEditor.OnGUI (UnityEngine.Rect rect, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Assets/Plugins/StatefulUI/Editor/ReferenceInspectors/StateEditor.cs:40)"

To Reproduce Steps to reproduce the behavior:

  1. Go to StatefulComponent inspector view
  2. Open state editor
  3. Scroll down to make top of the field is not visible
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

image

Desktop (please complete the following information):

Niaobu commented 10 months ago

I "solved" this by removing the BeginVertical/EndVertical calls, and I can't seem to notice any difference in the inspector.

dmitry-ivashenko commented 10 months ago

I "solved" this by removing the BeginVertical/EndVertical calls, and I can't seem to notice any difference in the inspector.

You're welcome to make a Pull Request 🙂

dmitry-ivashenko commented 2 months ago

Thanks for the report! Please try v1.0.7