Search Issue Tracker

Fixed

Votes

0

Found in

6000.2.0a5

Issue ID

UUM-98162

Regression

Yes

Console displays "InvalidOperationException: Cannot modify VisualElement hierarchy during layout calculation" error and "General" window in "Preferences" becomes empty during Editor Theme change

-

Steps to reproduce:

  1. Create a new 3D Unity Project
  2. Go to Unity -> Settings
  3. In the "General" section find "Editor Theme"
  4. Change it (if it will be needed do it) several times
  5. Observe the Console

Actual results: The user gets an error in the 'Console" view and the "General" window is empty. A short video is added in the "Attachments" section.

Expected results: No errors in the Console and the "General" window should present its data

Reproducible with versions: 6000.2.0a1, 6000.2.0a5

Not reproducible with versions: 6000.1.0b8, 6000.0.40f1, 2022.3.59f1

Can’t test with versions: -

Tested on (OS): Apple M1 Max, Sequoia 15.3.1

Notes: Full console error

InvalidOperationException: Cannot modify VisualElement hierarchy during layout calculation
UnityEngine.UIElements.VisualElement+Hierarchy.Clear () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:685)
UnityEngine.UIElements.VisualElement.Clear () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:256)
UnityEditor.SettingsWindow.ProviderChanged (UnityEditor.SettingsProvider lastSelectedProvider, UnityEditor.SettingsProvider newlySelectedProvider) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:276)
UnityEditor.SettingsTreeView.SelectionChanged (System.Collections.Generic.IList`1[T] selectedIds) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsTreeView.cs:66)
UnityEditor.SettingsTreeView.FocusSelection (System.Int32 selectedId) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsTreeView.cs:46)
UnityEditor.SettingsWindow.SelectProviderByName (System.String name, System.Boolean ignoreLastSelected) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:111)
UnityEditor.SettingsWindow.RestoreSelection () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:242)
UnityEditor.SettingsWindow.InitProviders () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:168)
UnityEditor.SettingsWindow.DrawTreeView () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:500)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:403)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)

  1. Resolution Note:

    Fixed by another internal issue: UUM-97149: Changing editor theme causes InvalidOperationException

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.