Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug][XRI 1.0.0-pre.6] Dragging a ScrollRect sets the scroll bar to NaN

maskedmouse opened this issue · comments

I seem to be running into an issue where I have a ScrollRect setup, but the scrollbar value is set to NaN when the XR Controller drags it outside of its own rect.
It is a bit of a weird issue and I see this happening in the XRI demo as well.
Unity 2021.1.24

There are no clear reproduction steps.
I've seen it happening in a build only when I drag the Rect and drop it onto some other UI element.
The scrollbars disappear and their value becomes NaN (at least from setting the value onto a TMProUGUI)
Even when setting to Clamp, this issue persists.
If the bug doesn't occur immediately, keep trying. It should happen easily though.

I tried fixing it by catching the float.IsNaN and then setting the value to 0. But it keeps getting called again with NaN value.
The velocity seems to be NaN as well.
It seems to keep setting the NaN value. Even after setting the velocity and scrollbar value back to 0 it still gets called again.

afbeelding

I can't seem to replicate this behaviour using the Oculus Link. Only in a build.

commented

This issue is very consistent on android (oculus quest) builds

@maskedmouse I am facing this same issue. Any solutions yet?

After updating Unity and XRI, it became less of a problem.

Seeing this on Unity 2021.2.10f1.
Upgrading to latest XRI fixed it for one panel, but then when touching another one it broke again (and at that point, touching the first panel breaks that as well)

The issue is tracked here: https://issuetracker.unity3d.com/issues/quest-xr-dragging-a-scrollrect-makes-it-disappear-and-set-nan-values

Seems like a fix is coming for this.

Yeah that's the bug report I did aside from creating this issue.
Good thing they seem to have found a fix for it!

Which means that this issue here can close now.