- Home /
Buttons less responsive inside scroll rect with touch controls (UGUI)
I've got a problem when using buttons inside a scroll rect. When running in the editor using a mouse, it all works fine, but when I make an Android build, the buttons are less responsive; basically you you have to use short, sharp taps in order to register the button click.
What seems to be happening is the scroll event is kicking in and this is blocking the button. I've worked with other engines/technologies before and you usually see a dead zone or dead time type setting - where basically the drag/scroll event doesn't register until you exceed the dead limits, but I can't find anything for it in the new UGUI stuff.
It's bad enough that if I can't find a fix I'll have to go with a different solution such as paging. I don't want to use scrollbars because screen space is limited.
Any thoughts/ideas greatly appreciated.
Answer by RakshithAnand · Nov 13, 2014 at 09:46 PM
This was a problem until beta 20. The OnDrag was being registered even for 1 pixel movement on a scroll rect which was causing the button to be not pressed on touch devices where you mostly move more than 1 or 2 pixels when you touch.
But from beta 20, they introduced the DragThreshold parameter which will drag after the given threshold(you can give how many ever pixels you want) which will register button clicks easily.
So update it to beta 21 and check once it should be fine. They have given DefaultDragThreshold as 5.
In Beta 20, this paramter is present on every scroll rect component And in Beta 21, this parameter is a global paramter present in the EventSystem
And dont update to RC1 yet, many are reporting various issues. Beta 21 seems to be stable mostly. Im using it from quite sometime and it seems to be stable
Ahh, I'm on beta 17 still. Thanks for the info - I'll update, build and then mark as answered if works. $$anonymous$$uch appreciated!
you are welcome. :) Even i faced this issue and was glad when they introduced that parameter!
Answer by waqaswaqas · Jul 19, 2016 at 04:02 PM
Decrease scroll sensitivity play with values. I mostly use 0.1 to overcome this problem.
Your answer
Follow this Question
Related Questions
The Button in the middle activates if i press two side of the button. 0 Answers
Problem with multi-touch on android game 1 Answer
Touch GUI texture to toogle animation 0 Answers
pan camera by touch / gui button 0 Answers
iPhone Touch Screen? 2 Answers