Steps to reproduce:
- Open the attached project
- Open the SampleScene
- Expand the PanelRenderer object and click on the > button in the Scene Hierarchy to open the UXML asset in context
- Right-Click on any of the UI elements and select the Standard Elements -> UI Library... option
- In the UI Library window, right-click on the MultiColumnListView element
- Select the Add Element option
- Repeat step 5
- Select the Add Child Element option
- Observe that "InvalidOperationException: You can't add directly to this VisualElement." errors are thrown
- Press the < button to exit UI Viewport window
- Observe the PanelRenderer object
Actual results: UXML asset and its elements are no longer displayed in the Hierarchy
Expected results: The UXML asset and its elements are displayed as before attempting to add an invalid node
Reproducible with versions: 6000.6.0b1, 6000.6.0b4, 6000.7.0a3
Can’t test with versions: 6000.0.79f1, 6000.3.20f1, 6000.5.4f1, 6000.6.0a7 (UI Viewport window not available)
Tested on (OS): macOS 26.5.2
Notes:
- The issue can be worked around by setting the PanelRenderer's source asset to None and then back to the original UXML asset