Search Issue Tracker

By Design

Votes

0

Found in [Package]

0.11.0-preview

Issue ID

1245285

Regression

No

UI Builder ListView Container child elements get removed when changing the 'Item Height'

Package: UI Builder

-

How to reproduce:
1. Create a new project
2. Import the UI Builder from the Package Manager
3. Open the UI Builder window (Window -> UI -> UI Builder)
4. In the UI Builder Hierarchy add a ListView Container
5. Add at least 1 element (for example, an Integer) as a child of the ListView
6. Select the ListView and in the UI Builder Inspector window change the Item Height value to anything else

Expected result: the Item Height changes
Actual result: the Item Height changes and the ListView child elements disappear from the Hierarchy

Reproducible with: 0.8.1-preview (2019.3.14f1), 0.11.0-preview (2019.3.14f1, 2020.1.0b9, 2020.2.0a11)
Could not test with: 0.8.0-preview (2019.3.14f1) (error importing package), 0.7.0-preview and below (2019.3.14f1) (ListView not introduced)

Notes:
Saving the UXML file reverts the loss

  1. Resolution Note:

    ListView is a virtual control. It manages its own children and should not be given children manually.
    See: https://docs.unity3d.com/ScriptReference/UIElements.ListView.html
    In a future version of Unity, the UI Builder will not allow adding of children to the ListView to avoid this problem. But this is not a bug.

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.