Copyright © 2026 Unity Technologies
Reproduction steps:
1. Create a new project
2. Create Style Rule Inspector Element (GameObject > UI Toolkit > Standard Elements > Unity > UIToolkit > Editor > Style Rule Inspector)
3. Create UI Document
4. Create any other Standard Element (GameObject > UI Toolkit > Standard Elements)
5. Observe the Console
Actual result: “NullReferenceException: Object reference not set to an instance of an object” error is thrown
Expected result: No warnings or errors are thrown
Reproducible with: 6000.6.0a7, 6000.6.0b2, 6000.7.0a1
Couldn’t reproduce with: 6000.0.78f1, 6000.3.19f1, 6000.5.2f1, 6000.6.0a6 (No Standard Elements option)
Reproduced on: macOS Tahoe 26.5 (M4), Ubuntu 24.04
Note:
Full error:
NullReferenceException: Object reference not set to an instance of an object UnityEngine.UIElements.Layout.LayoutConfig.get_TransformFlags () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Layout/LayoutConfig.cs:37) UnityEngine.UIElements.BaseVisualElementPanel.get_transformFlags () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:501) UnityEngine.UIElements.BaseVisualElementPanel.get_duringLayoutPhase () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:718) UnityEngine.UIElements.BaseVisualElementPanel.set_duringLayoutPhase (System.Boolean value) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:721) UnityEngine.UIElements.VisualTreeLayoutUpdater.Update () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualTreeLayoutUpdater.cs:316) UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualTreeUpdater.cs:146) UnityEngine.UIElements.Panel.ValidateLayout () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:1650) UnityEngine.UIElements.BaseRuntimePanel.Update () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:1994) UnityEngine.UIElements.UIElementsRuntimeUtility.UpdatePanels () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsRuntimeUtility.cs:319) UnityEngine.UIElements.UIElementsRuntimeUtilityNative.UpdatePanels () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Native/UIElementsUtility.bindings.cs:18) 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