Hello,
Using latest unity 2021.2.0f1 (UI Toolkit, runtime). Noticed strange behaviour on item double click in a ListView. There is no effect if you just double click an item, only on 3rd click it’ll call onItemsChosen. 3rd click can be even done with a delay (like double click, pause, click)
Also noticed that MouseDownEvent always returns clickCount = 1 (was returning expected click count before), MouseUpEvent seems to work normally.
Please note, I’m using Input Manager (Old).
Is it an expected behaviour, or did I miss something?
Thanks.
Hi, can you create an bug report for this using “Help > Report a bug…” menu?
Thanks
I did some more tests and got following:
Note, I’m using old input system.
The bug appears if I use following scene setup:
I’ve added EventSystem object because when testing beta not all input events where getting through and in a separate thread I was advised to add it. Maybe I misunderstood something then 
But, if I remove/disable EventSystem object, everything works as before:
Now, the question is, what is the minimum correct scene setup for runtime ui toolkit that uses old input system?
Thanks.
Here is submitted bug report (1379054) https://fogbugz.unity3d.com/default.asp?1379054_dngh0rcej2ub40lr
Still would really appreciate, someones answer to above question.
Hi Maverick,
Thank you for submitting the bug. To answer your question, the minimum setup for UI Toolkit with old input is to have no special component on the scene, no EventSystem, no StandaloneInputModule. UI Toolkit has an invisible default event system that will pick up automatically and reroute all the proper events from legacy input into UI Toolkit runtime panels.
The only reason you would want to use EventSystem + StandaloneInputModule with UI Toolkit is to have some interoperability with UGUI objects (the component-based UI system with Canvases, RectTransforms, etc.), if you have any in your scene. UI Toolkit would then listen to events from UGUI’s EventSystem instead of using its own input. If you have bugs like clickCount on MouseDown only when using EventSystem + StandaloneInputModule, it most likely means that the bug is also present in UGUI and comes from their input handling code. This is a very interesting find and it’s a bug that does affect us, so thank you for pointing it out! Chances are that this bug will be tackled by people outside of the UI Toolkit team since it seems to be part of the UGUI event system more than ours, but in all cases we will keep an eye on it for sure!
Thank you for details!
As a follow-up, what would be the minimum setup for new input system + uitoolkit?
For now the only way to get new Input System support is through the EventSystem + InputSystemUIInputModule components. You might be getting the same clickCount error as with StandaloneInputModule though, that would need to be confirmed, but InputSystemUIInputModule does its own implementation of pointer events so with some luck they have fixed it on their side already.
1 Like