Search Issue Tracker
Fixed
Fixed in 2022.3.58f1, 6000.0.38f1, 6000.1.0b6, 6000.2.0a2, 7000.0.0a17
Votes
0
Found in
2021.3.40f1
2022.3.40f1
6000.0.13f1
6000.1.0a7
6000.2.0a1
7000.0.0a1
Issue ID
UUM-76821
Regression
No
NullReferenceException is thrown when undoing Selector deletion in Isolation
Steps to reproduce:
- Create or open any Project with the UI Toolkit installed
- Create a "UI Document" Asset and open it
- Add any UI Element to the Hierarchy
- Right click it and select "Create Template" and select it
- Create and attach a StyleSheet with a Selector added to it
- Right click the Template in the Hierarchy and select "Open Instance in Isolation"
- In the StyleSheets section, select a greyed out Selector, right click to delete it
- Undo
Actual results: "NullReferenceException: Object reference not set to an instance of an object" is thrown
Expected results: No Errors are thrown
Reproducible with versions: 2021.3.40f1, 2022.3.40f1, 6000.0.13f1
Tested on (OS): macOS Sonoma, Windows 11
Error message:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.StyleSheets.ConverterUtils.FindProperty (UnityEngine.UIElements.StyleComplexSelector selector, System.String propertyName) (at <284b2bcf4ed84f27916114fd162acc12>:0)
Unity.UI.Builder.StyleComplexSelectorExtensions.IsSelected (UnityEngine.UIElements.StyleComplexSelector scs) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.VisualElementExtensions.IsSelected (UnityEngine.UIElements.VisualElement element) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.VisualElementExtensions.FindSelectedElementsRecursive (UnityEngine.UIElements.VisualElement parent, System.Collections.Generic.List`1[T] selected) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.VisualElementExtensions.FindSelectedElementsRecursive (UnityEngine.UIElements.VisualElement parent, System.Collections.Generic.List`1[T] selected) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.VisualElementExtensions.FindSelectedElementsRecursive (UnityEngine.UIElements.VisualElement parent, System.Collections.Generic.List`1[T] selected) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.VisualElementExtensions.FindSelectedElementsRecursive (UnityEngine.UIElements.VisualElement parent, System.Collections.Generic.List`1[T] selected) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.VisualElementExtensions.FindSelectedElements (UnityEngine.UIElements.VisualElement element) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderSelection.RestoreSelectionFromDocument (UnityEngine.UIElements.VisualElement sharedStylesAndDocumentElement) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.Builder.OnEnableAfterAllSerialization () (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.Builder.OnUndoRedo () (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderCommandHandler.OnUndoRedo (UnityEditor.UndoRedoInfo& info) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
UnityEditor.Undo.Internal_CallUndoRedoEvent (UnityEditor.UndoRedoInfo undoInfo) (at <284b2bcf4ed84f27916114fd162acc12>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
**
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Add comment