- Home /
Scroll Rect works with mouse wheel but not mouse drag?
I set up a scroll rect. It works correctly I believe because it works with the mouse wheel, but when you click on it to drag it does not scroll.. What would cause this behavior?
Answer by Felipe669 · Dec 20, 2019 at 02:33 PM
Hi there!
The events "OnBeginDrag", "OnDrag" and "OnEndDrag" are probably being intercepted by another game object. I would check if there's any UI element in front of the Scroll Rect.
Answer by cgklutts · Dec 20, 2019 at 11:26 PM
@Felipe669 Thanks for responding. I checked the canvases and moved them around to no avail. I noticed if I populate the content directly within the editor it works as it should.. when I populate the content within the code it only allows me scroll with the mouse wheel. Does this help narrow down the problem?
The problem lies in the fact that I reposition the canvas within my script to make sure it stays on the far right side of the screen. I'm using a world space canvas so I'm not sure how to anchor it.. I'll try to figure it out thanks.
Your answer
Follow this Question
Related Questions
Player controls for scrolling horizontally/vertically? 0 Answers
Why are the elements of my scrollview scaled different after refreshing? 0 Answers
How to solve event triggers blocking scrollview inputs in an inventory/menu? 2 Answers
Multiple Background Scroll - The best way to do it 0 Answers
Scroll view using Mesh 2 Answers