Search Issue Tracker
Fixed
Fixed in 2022.2.21f1, 2023.1.0b18, 2023.2.0a15
Votes
7
Found in
2021.2.0a4
2021.2.7f1
2022.1.0b2
2022.2.17f1
2023.1.0a1
2023.2.0a1
Issue ID
UUM-3432
Regression
Yes
Error "GUI Error: Invalid GUILayout state" when using BeginVertical
Reproduction steps:
1. Open user's attached project
2. Select GameObject in the Hierarchy
3. In the Inspector find Script Component and press "Open Window"
4. At the popped up window press the Material selector
5. Observe Console error
Expected result: No errors are thrown when using custom GUILayout
Actual result: "GUI Error: Invalid GUILayout state" error is thrown
Reproducible with: 2021.2.0a4, 2021.2.7f1, 2022.1.0b2
Not reproducible with: 2019.4.34f1, 2020.3.25f1, 2021.1.28f1, 2021.2.0a3
Comments (3)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [VFX Graph] ArcCone Direction computation is wrong in Base Mode
- [Android] [Galaxy Tab] A singular Pen touch logs a Pen touch event and a singular finger touch event when logged using "VisualElement.RegisterCallback" with "Pointer(Up/Down)Event"
- Crash on D3D12DescriptorCache::Deallocate or vkGetInstanceProcAddr when loading RenderDoc in a specific Scene
- [HDRP] Lit material preview is rendered incorrectly with a mask map
- The "LerpWhiteTo" missing function displays an error when the Shadows.hlsl shader is included in a Shader file
ghosthjt
Aug 12, 2023 05:27
GUI Error: Invalid GUILayout state in AddressableAssetsWindow view. Verify that all layout Begin/End calls match
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
unity 2022.3. still have this issue.
Aka_ToolBuddy
Apr 26, 2023 12:17
For more information, head to the forum thread I posted about this issue:
https://forum.unity.com/threads/avoiding-you-getting-insane-because-of-invalid-guilayout-state-errors.1429669/
Aka_ToolBuddy
Apr 26, 2023 11:43
Found the reason: Some Unity UI components (such as a material selector) throw ExitGUIException exceptions as part of their regular, non exceptional, code flow. This exception when thrown inside a GUILayout.BeginX/EndX block, stops the EndX method from being called, leading to the error described above