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'
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
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.