Scroll Rect with Buttons

Hi,

I have a canvas parenting an image (Scroll Rect and Mask Components) and a content (Grid Layout Group Component) game object. The content contains some images with OnPointerClick methods.
When I start the scene, I can’t scoll if the touch begins on one of the images. It is only possible, if the touch begins on the background. I know I can solve it with raycasts but I don’t know how.

Normally, if a GameObject has no behavior for a drag, the drag will automatically be passed to a parent object that does–which means you can typically drag on a Button inside of a ScrollRect to cause a scroll. So it sounds like something is broken in your case.

Can you say more about these “images with OnPointerClick methods”?

1 Like

@Gerray2

Did you already check this thread? Might be helpful (not sure, as it’s not exactly the same case).