MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Clearing VirtualizedScrollRectList doesn't always work.

Open Magiel1975 opened this issue 2 years ago • 1 comments

Overview

I wasn't able to completely clear the list every time. Perhaps I need more info on how to properly use the OnInvisible Action. My workaround was to add public void ResetList() { SetItemCount(0); OnValidate(); } to a copy of the VirtualizedScrollRectList class

Expected behavior

When clearing the list with SetItemCount(0), all items should be removed every time SetItemCount(0) is used.

Actual behavior

First time the items are removed, but the second time the items remain visible in the list and ItemCount remains > 0. The new items will appear on the same position as the items still in the list, showing items through each other.

Steps to reproduce

  1. Add Items to the List.
  2. SetItemCount(0)
  3. Add new Items to the List.
  4. SetItemCount(0)

Unity editor version

2021.3.16f1

Mixed Reality Toolkit release version

MRTK3

Magiel1975 avatar Jan 16 '23 21:01 Magiel1975

@maluoi ? 😉

Zee2 avatar Jan 18 '23 05:01 Zee2