Copyright © 2026 Unity Technologies
Steps to reproduce:
1. Create new Unity project using Universal 3D Template
2. In Hierarchy create Label Element (Right-click > UI Toolkit > Standard Elements > Label)
3. In “Open UI stage” pop-up press “Continue” and save UXML file
4. In Inspector window, expand Backdrop Filter
5. Add Custom Filter
6. Press undo with keyboard shortcut
7. Press redo with keyboard shortcut
8. Observe the Console window
Actual results: “NullReferenceException” unclearable errors are spammed in the Console window
Expected results: No errors are spammed in the Console window
Reproducible with versions: 6000.6.0a7, 6000.6.0b4, 6000.7.0a2
Can’t test with versions: 6000.6.0a6 and lower (No such feature to create UI Elements in Hierarchy window)
Tested on (OS): Ubuntu 24.04, macOS Tahoe 26.5.1 (M1)
Notes:
NullReferenceException: Object reference not set to an instance of an object UnityEditor.UIElements.StyleSheetExporter.WriteStyleValueHandle (UnityEditor.UIElements.StyleSheetExporter+ExportContext& ctx, System.Span`1[T] handles, System.Int32& handleIndex) (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/USS/StyleSheetExporter.cs:562) UnityEditor.UIElements.StyleSheetExporter.WriteStyleValueHandleBlock (UnityEditor.UIElements.StyleSheetExporter+ExportContext& ctx, System.Span`1[T] handles) (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/USS/StyleSheetExporter.cs:518) UnityEditor.UIElements.StyleSheetExporter.GetStylePropertyValueString (UnityEngine.UIElements.StyleSheet styleSheet, UnityEngine.UIElements.StyleProperty property, UnityEditor.UIElements.StyleSheetExporter+UssExportOptions options) (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/USS/StyleSheetExporter.cs:825) Unity.UIToolkit.Editor.MatchingSelectorsElement+MatchingSelectorElement.RefreshProperties (System.Collections.Generic.HashSet`1[T] setProperties) (at /Users/bokken/build/output/unity/unity/Modules/UIToolkitAuthoringEditor/Managed/Inspector/Controls/MatchingSelectorsElement.cs:108) Unity.UIToolkit.Editor.MatchingSelectorsElement+MatchingSelectorElement.SetInlineRule (UnityEngine.UIElements.InlineStyleAccess+InlineRule inlineRule, System.Collections.Generic.HashSet`1[T] setProperties) (at /Users/bokken/build/output/unity/unity/Modules/UIToolkitAuthoringEditor/Managed/Inspector/Controls/MatchingSelectorsElement.cs:72) Unity.UIToolkit.Editor.MatchingSelectorsElement.Refresh () (at /Users/bokken/build/output/unity/unity/Modules/UIToolkitAuthoringEditor/Managed/Inspector/Controls/MatchingSelectorsElement.cs:247) Unity.UIToolkit.Editor.MatchingSelectorsElement.UnityEngine.UIElements.IVisualElementChangeProcessor.ProcessChanges (UnityEngine.UIElements.BaseVisualElementPanel p, UnityEngine.UIElements.AuthoringChanges changes) (at /Users/bokken/build/output/unity/unity/Modules/UIToolkitAuthoringEditor/Managed/Inspector/Controls/MatchingSelectorsElement.cs:222) UnityEngine.UIElements.VisualTreeAuthoringUpdater.Update () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Authoring/VisualTreeAuthoringUpdater.cs:224) UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualTreeUpdater.cs:146) UnityEngine.UIElements.Panel.UpdateForRepaint () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:1718) UnityEngine.UIElements.Panel.Repaint () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:1797) UnityEngine.UIElements.UIElementsRuntimeUtility.RepaintPanel (UnityEngine.UIElements.BaseRuntimePanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsRuntimeUtility.cs:174) UnityEngine.UIElements.UIElementsRuntimeUtility.RepaintPanels (System.Boolean onlyOffscreen) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsRuntimeUtility.cs:240) UnityEngine.UIElements.UIElementsRuntimeUtilityNative.RepaintPanels (System.Boolean onlyOffscreen) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Native/UIElementsUtility.bindings.cs:24) UnityEngine.StackTraceUtility:ExtractStringFromExceptionInternal(Object, String&, String&) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:50)
Issues you vote on will appear here