I’ve setup a Scroll Rect to scroll a Toggle Group with a bunch of Toggles. If I use the OnValueChange event in the Toggle component the scrolling works perfectly. Instead, if I want come more complex logics and I use an Event Trigger component (to get Select, Deselect and other events) these seem to absorb the touch event breaking the scrolling functionality.
Is someone else having this issue? Do you know what may cause it and a workaround?
Thank you all.
How to reproduce the problem step by step
Create a new scene
Create a UI Canvas
Create a UI Panel, call it “Scroller” and make it child of your canvas
Create another UI Panel, bigger than the previous one, and make it child of the previous panel, call it “Content” and make sure it is assigned an image.
Create a new game object and add a Toggle Group component to it. Call it toggle group and make it child of you “Content” panel.
Create one or two Toggles, add some graphics to them (image or text) and make them children of “Content”
Test the scrolling. It should work even when you start dragging from one of the toggles.
Now add an Event Trigger component to your triggers, add a couple of event types (Select and Deselect will do).
Test again. Now it shouldn’t work when starting to drag from any toggles.
Fairly old question but ran into somewhat same situation with Unity 5.3.3. Easy way to fix is put your eventtrigger on the scroll rect instead of the object you want to cause the trigger, the scroll rect triggered it for me.
a work around would be to use a button component and then add the triggers to that button using the already supplied “On ClicK” trigger of the button itself rather than using standalone event trigger components. it is strange but it works