Search Issue Tracker
By Design
By Design in 2022.2.X
Votes
0
Found in
2019.4.36f1
2020.3.31f1
2021.2.14f1
2022.1.0b11
2022.2.0a7
2022.2.0a14
Issue ID
UUM-3431
Regression
No
"EndLayoutGroup: BeginLayoutGroup must be called first." error is thrown when using AssetDatabase.ExportPackage in EditorWindow
How to reproduce:
1. Open the user's attached "ExportPackage" project
2. Open the "Package Exporter -> Exporter Window" window from the menu
3. Select the "Export package" button
Expected result: The "Exporting package" window is invoked
Actual result: "EndLayoutGroup: BeginLayoutGroup must be called first." error is thrown in the Console log
Reproducible with: 2019.4.36f1, 2020.3.31f1, 2021.2.14f1, 2022.1.0b11, 2022.2.0a7, 2022.2.0a14
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
- Usymtool tries to upload GameAssembly.pdb when it doesn't exist after building with Mono backend
- “NullReferenceException” error thrown in the Console when running HDRP Wizard “Fix All” in URP project after installing HDRP Package
- "Debug Draw Mode" unchecked checkboxes are not visible
- [Android] App crashes when Volume Depth of Field is set to "Bokeh" while using Vulkan Graphics API
- Baked Off Mesh Links outside the modified area are deleted when using NavMeshSurface.UpdateNavMesh
Resolution Note:
This problem occurs because of how IMGUI is designed. It doesn't support re-entrancy, meaning that you can't open a modal IMGUI during another window's OnGUI().
There is a very easy workaround though which consists in adding a call to GUIUtility.ExitGUI() right after the call that triggers re-entrancy (so in this case right after the call to AssetDatabase.ExportPackage().
https://docs.unity3d.com/ScriptReference/GUIUtility.ExitGUI.html
Resolution Note (2022.2.X):
This problem occurs because of how IMGUI is designed. It doesn't support re-entrancy, meaning that you can't open a modal IMGUI during another window's OnGUI().
There is a very easy workaround though which consists in adding a call to GUIUtility.ExitGUI() right after the call that triggers re-entrancy (so in this case right after the call to AssetDatabase.ExportPackage().
https://docs.unity3d.com/ScriptReference/GUIUtility.ExitGUI.html