Search Issue Tracker

Fixed

Votes

0

Found in

2023.1.0a25

Issue ID

UUM-31148

Regression

Yes

Dragging an element below a certain threshold makes it disappear from a List View

-

Steps to reproduce:

1. Open any project
2. Create a Script with a public array field (e.g. “public GameObject[] myObjects”)
3. Attach this script to any GameObject in the scene
4. Add several elements to the myObjects field via the reorderable list
5. Drag the first element of the list on top of the element below it and release
6. Repeat for subsequent elements

Expected result: the drop action is completed and the elements get reordered after a certain offset threshold
Actual result: the drop action fails and the element disappears if it isn’t dragged a certain amount. This can be repeated and ultimately leave the reorderable list empty. It results in the following error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.ListViewDraggerAnimated.OnDrop (UnityEngine.Vector3 pointerPosition) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/DragAndDrop/ListViewDraggerAnimated.cs:146)
UnityEngine.UIElements.DragEventsProcessor.OnPointerUpEvent (UnityEngine.UIElements.PointerUpEvent evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/DragAndDrop/DragEventsProcessor.cs:138)

Reproducible with: 2023.2.0a7, 2023.1.0b9, 2023.1.0a26
Not reproducible with: 2023.1.0a25

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.