Search Issue Tracker

Won't Fix

Votes

0

Found in

6000.0.17f1

6000.1.0a7

7000.0.0a1

Issue ID

UUM-79259

Regression

No

VisualElement disappears when selecting its parent in UI Builder

-

Steps to reproduce:
1. Open Unity and load the project.
2. In the Project window navigate to Packages/Automatic Performance Profiler/Editor/UI and open PerformanceManagerControl.uxml Visual Tree Asset in UI Builder
3. Select the #TestList element in the Viewport or in the Hierarchy

Expected result: Highlights the selection and shows all elements
Actual result: The “#VisualElement/#TestList/ScrollVIew/#unity-content-and-vertical-scroll-container” VisualElement disappears

Reproducible with: 6000.0.0f1, 6000.0.17f1
Could not test with: 2021.3.43f1, 2022.3.44f1, 2023.3.0b10 (Automatic Performance Profiler package is not supported)

Testing environment: macOS Sonoma 14.5 (Intel), Windows 10 (by user)
Not reproducible on: No other environment tested

Note: Dock or undock the UI Builder window to make the VisualElement reappear

  1. Resolution Note:

    Looks like an issue with the package used in the project. The TestList is using the dataSource to apply a different itemsSource during the AttachToPanelEvent, which will only happen once. Since the binding-source-selection-mode is set to AutoAssign, the runtime data binding system will then take over as soon as there's a change to the data source, binding to the actual data source, and not the ActionList created from it.

    The code should probably instead set a binding between the ActionList to the itemsSource. Here's more info about how to bind a the itemsSource of a ListView.
    https://docs.unity3d.com/6000.0/Documentation/Manual/UIE-runtime-binding-list-view.html

    For more questions, please reach out on https://discussions.unity.com/lists/ui

Comments (1)

  1. darrin98

    Sep 02, 2024 06:10

    Steps to Reproduce:

    Open Unity and load the project.
    In the Project window, navigate to Packages/Automatic Performance Profiler/Editor/UI.
    Open the PerformanceManagerControl.uxml file in UI Builder.
    In the Viewport or Hierarchy, select the #TestList element.
    Expected Result:
    The selected element is highlighted, and all child elements are displayed correctly.

    Actual Result:
    The #VisualElement/#TestList/ScrollView/#unity-content-and-vertical-scroll-container VisualElement disappears from the UI Builder Viewport.

    Reproducible With:

    Unity versions: 6000.0.0f1, 6000.0.17f1.
    Could Not Test With:

    Unity versions: 2021.3.43f1, 2022.3.44f1, 2023.3.0b10 (Automatic Performance Profiler package not supported).
    Testing Environment:

    macOS Sonoma 14.5 (Intel).
    Windows 10 (tested by the user).
    Not Reproducible On:

    No other environments tested.
    Note:
    Docking or undocking the UI Builder window causes the VisualElement to reappear.

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.