Search Issue Tracker

Active

Under Consideration for 6000.5.X

Votes

0

Found in

6000.5.0a6

Issue ID

UUM-133908

Regression

No

NullReferenceException & ArgumentException for UXML Preview is thrown when opening Project and then Selecting UI Document UXML Asset with Project Wide Runtime Theme Changed

Steps to reproduce:

  1. Open any Project and install the AI Packages via the AI Button in Editors Toolbar
  2. In the Project Browser create and a UI Document UXML, select it and make sure that the Preview is open in the Inspector
  3. Open the Project Settings for UI Toolkit and at the bottom switch the "Runtime" Theme to the "App UI - Dark - Large" Theme
  4. Close the Editor
  5. Open the same Project and select the created UI Document UXML Asset

Actual results: The Preview in the Inspector flickers, Errors are logged: "NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.VisualTreeAssetEditor.DrawPreviewThemeDropdown () (at :0)"
"ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint
Aborting"

Expected results: Project Settings are loaded without Errors for the Preview Theme Dropdown

Reproducible with versions: 6000.5.0a6

Can’t test with versions: 6000.0.67f1, 6000.3.8f1, 6000.4.0b8 (No Preview Theme Dropdown menu feature)

Tested on (OS): Windows 11

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.