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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.