Search Issue Tracker

By Design

Votes

1

Found in

2022.3.58f1

6000.0.38f1

6000.1.0b6

6000.2.0a3

Issue ID

UUM-97638

Regression

No

ListView fails to display items when the source list is cleared and a single element is added

-

Reproduction steps:
1. Open the attached “IN-92741” project
2. Open the “Scenes/SampleScene” Scene
3. Enter the Play Mode
4. Observe the Game View

Expected result: “Console” GameObject shows time since the game start
Actual result: “Console” GameObject only shows initial number “0” and then stops

Reproducible with: 2022.3.58f1, 6000.0.38f1, 6000.1.0b6, 6000.2.0a3

Reproducible on: Windows 10, Windows 11 (user)
Not reproducible on: No other environments tested

  1. Resolution Note:

    When a change is made to the data source you need to inform the ListVIew so that it can update itsellf. After adding the item to logs call RefreshItems();
    https://docs.unity3d.com/ScriptReference/UIElements.BaseVerticalCollectionView.RefreshItems.html

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.