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
- [UI Builder] Viewport's gizmos for Margin and Padding disappear when dragging to modify the value and the cursor leaves the Spacing section
- "Multiplayer Center" window does not reflect changes made in "Other Packages" section
- Crash on D3DKMTOpenResource when capturing with RenderDoc while GPU Skinning is set to GPU(Batched)
- Editing and saving Curve changes in UI Builder window throws multiple errors in the Console
- [UI Builder] Value is not selected when left clicking on Spacing/Border Widget values
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.