0
\$\begingroup\$

When developing in Unity, there is a bug where if you put a Button on a Scroll View, the scroll is hyper-sensitive on some Androids. This makes the button depress immediately after pressing it, because it thinks you are trying to scroll. This can be resolved by reducing the scroll sensitivity on the ScrollRect.

I do not want to reduce the sensitivity on all Android devices. For example, on the newer ones such as the Pixel, it works perfectly. Reducing the sensitivity actually makes it feel mildly less responsive.

How can I find out which models/operating systems that this bug exists on? I would prefer to just not release to those versions. (They are far and few between, but enough to make their 1 star reviews hurt badly.)

\$\endgroup\$
  • \$\begingroup\$ There are over 10,000 different android devices out there. I think this question is beyond the scope of our site. \$\endgroup\$ – Almo Jul 1 '17 at 18:17
  • \$\begingroup\$ @Almo I'll rephrase the title to better match the question. \$\endgroup\$ – Evorlor Jul 1 '17 at 18:20
2
\$\begingroup\$

I can't tell you which models have this issue. But here I'm giving you a solution:

Select your active EventSystem GameObject:

Event System

Find the Event System component:

Drag Threshold

Increase the Drag Threshold field.

This field determines the threshold of pointer movement when pressed down before Unity registers it as a drag. By increasing this field we are telling Unity that more pointer movement is required before registering the action as a drag.

The value of Drag Threshold is in pixels.


If you are not satisfied with manual adjustment, I found an article that performs an automatic Drag Threshold calculation.


Edit: Also in this git repository on BitBucket named Unity UI Extensions, there is a module that claims it can correct Drag Threshold for high DPI systems. Looking at the source, I see the script is doing something almost identical with the article I linked above.

You can find the source code of the DragCorrector script here.

\$\endgroup\$
  • \$\begingroup\$ +1 I believe this may solve my issue, thanks! I am not going to checkmark it though, because I am still hoping for an answer to my question. How to find out which Android devices have different specs would be valuable information to me. \$\endgroup\$ – Evorlor Jul 4 '17 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.