How to disable mouse wheel scroll inside a scrollview?

Hello,

I’m pretty new to Unity and coding in general. I would like to disable the mouse wheel automatic scrolling when in my scrollview. I have looked for this all over the web and can’t seem to find an answer.

I have created a mousedown + mouseposition tracking to update the scrollview Vector2D (which control the position of my scrollview content). This allows me to “drag” the content around. Unfortunately when I use the scroll wheel of the mouse it also updates the Vector2D and consequently moves the content inside.

I tried preventing this by constantly updating the Vector2D, but everytime I scroll with the mouse wheel, you can see 1 frame of scrolling which is definitely not what I am looking for.

Is there any way to prevent the mouse wheel to scroll inside my scrollview? Am I thinking this the wrong way?

Thanks!

Hello there,
I know this is old but I couldn’t find many answers about this, and I finally figured out myself a very simple solution.
Just set the “Scroll Sensitivity” field of your Scroll Rect script to 0 (image below).
Cheers!

108870-screenshot.png