Copyright © 2026 Unity Technologies
Steps to reproduce:
1. Create new Unity project using Universal 3D Template
2. In Hierarchy window create any UI Element (e.g Visual Element) (UI Toolkit > Standard Elements > Visual Element)
3. Save UXML file
4. Enter Play mode
5. Select Visual Element in Hierarchy window
6. In Inspector window edit any Visual Element settings (e.g add any Variable)
7. Exit Play mode
8. In “UI Assets Have Been Modified” press “Discard Changes”
9. Observe the Console window
Actual results: “Accessing invalid property” errors are thrown in the Console window
Expected results: No errors are throw in the Console window
Reproducible with versions: 6000.7.0b2, 7000.0.0a1
Can’t test with versions: 6000.6.2f1 (Unable to interact with Element in Inspector window)
Tested on (OS): macOS 27 (Apple silicon)
InvalidOperationException: Cannot modify VisualElement hierarchy during layout calculation UnityEngine.UIElements.VisualElement+Hierarchy.ValidateElementCanBeModified () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:630) UnityEngine.UIElements.VisualElement+Hierarchy.Clear (UnityEngine.UIElements.VisualElementClearOptions options) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:815) UnityEngine.UIElements.VisualElement.Clear (UnityEngine.UIElements.VisualElementClearOptions options) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:347) UnityEngine.UIElements.VisualElement.Clear () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:314) UnityEditorInternal.Profiling.RenderingDetailsViewController.ReloadData (System.Int64 selectedFrameIndex) (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerModules/Rendering/RenderingDetailsViewController.cs:229) UnityEditorInternal.Profiling.RenderingDetailsViewController.OnFrameChanged (System.Int64 idx) (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerModules/Rendering/RenderingDetailsViewController.cs:225) UnityEditor.ProfilerWindow.InvokeSelectedFrameIndexChangedEventIfNecessary (System.Int32 newFrame) (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:2304) UnityEditor.ProfilerWindow.SetCurrentFrameRangeDontPause (System.Nullable`1[T] frameRange) (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1737) UnityEditor.ProfilerWindow.SetCurrentFrameDontPause (System.Int32 frame) (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1728) UnityEditor.ProfilerWindow.SetCurrentFrame (System.Int32 frame) (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1748) UnityEditor.ProfilerWindow.SelectAndStayOnLatestFrame () (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1718) UnityEditor.ProfilerWindow.FrameNavigationControls () (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1692) UnityEditor.ProfilerWindow.DrawMainToolbar () (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1506) UnityEditor.ProfilerWindow.DoLegacyToolbarGUI () (at /Users/bokken/build/output/unity/unity/Modules/ProfilerEditor/ProfilerWindow/ProfilerWindow.cs:1771) 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:392) UnityEditor.GUIView:ProcessEvent(EntityId, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUIView.cs:89)
Issues you vote on will appear here