Unity Scroll Rect UI Does Not Drag

While testing in Unity Editor, Scroll Rect UI moves on mouse-drag as normal, but when testing on ML2 dragging scroll rect content does not work (dragging scroll bars do work however). We are just using the Unity Input System (1.5.0) (no XRI or MRTK package), and are using the "Input System UI Input Module" component and binding tracked position and rotation to ML2 hands using hand pinch as a "Left Click". All other UI interaction seems to be working. I found this link that shows a similar issue that's been fixed for Oculus Here; I wonder if it could be related, with both devices being Android-based.

Unity Editor version: 2022.8.f1
ML2 OS version: B3E.230302.12-R.024
MLSDK version: 1.2.0-dev2
Host OS: MacOS

Sorry to hear that you’re having issues with this. Can you check in the editor using App Sim to see if the issue can be reproduced in the editor?

Interesting enough it works in App Sim, I tried both "Simulator" and "Hybrid" - I then built to device again and confirmed it still doesn't work on the actual device.

I just confirmed that the on drag event does not work. I recommend reporting this issue to Magic Leap. To test which events are supported by XRI , try using the XRI simulator inside the editor.

Note, this is different than the Magic Leap App sim.

Doesn't the XRI simulator simply augment the Unity input system by creating a virtual XR device bound to keyboard actions? Either way it works. I'll report the issue. My gut tells me it's some issue on-device similar to the exact Bug Oculus had that I mentioned above.

@sascha We have reported the issue to Unity. As a workaround, we found that setting the Tracked Device Drag Threshold to a really low number on the XR UI Input Module resolves this issue. Try setting the value to 0.005, this should allow the application to report the On Drag Events properly.
I will keep you updated if I get any information regarding an official fix.

@kbabilinski Unfortunately we're using the "Input System UI Input Module" and not "XR UI Input Module" to drive input for our UI... this means the only exposed field for drag threshold is in the "Event System" component, and that field is an integer value (pixel-based); there's no way to set it to a decimal. If I set it to "1" the scrolling issue persists. If I set it to "0", scrolling works but then button clicks don't work - Unity's logic will always think I'm dragging and forgo the "OnClick" event. I guess we must continue to wait on Unity.

Hi Sascha,

I received some more information for you: The Unity project has a drag threshold. The workarounds are either to disable the drag threshold or to set it to a low amount for dragging to be recognized.

I hope that is of some help, please let us know if the workaround provided is sufficient.

Thank you,