[Fixed] Buttons Overriding Event Trigger Listeners?

Hi everyone, i’m trying to make a draggable snapping scrolling list with 5 panels (Each one with the size of the screen, it would be a level selection screen where you can drag it, and go to world 1, 2, 3, and so on)

I’m using this script for the Screen Snaping in the Horizontal Scroll Bar

For this script to work, i have to add an event trigger for ondrag, and pointerUp.

Till that, everything works amazing.

My problem comes when i add Buttons to my screen, if i Drag from a button, the snapping never works, its like for start clicking on the button, the event trigger on my scroll cointainer is never called.

i have uploaded a package with a simple scene with the menu if that helps :slight_smile:

Any hints on this would be really apreciated

Thanks in advance!

1909149–123162–snapping.unitypackage (20.3 KB)

Oh Forget about this. i managed to fixed it.

If it helps anyone, the problem was caused for using the “Event Trigger” and binging my events on the editor, someway i guess they were “overriding their listeners” and my script never got the message about the drag end.

i’ve just deleted the event trigger on my game object and in the script implemented

public void OnEndDrag (PointerEventData eventData)
public void OnBeginDrag (PointerEventData eventData)