Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Browld · Dec 14, 2013 at 07:34 PM · scrollviewscrollscrolling

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!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Commander Quackers · Dec 14, 2013 at 07:59 PM 0
Share

You might find this helpful

http://answers.unity3d.com/questions/315822/disabling-mouse-wheel-when-user-is-scrolling-scrol.html

avatar image Browld · Dec 15, 2013 at 02:35 PM 0
Share

Sadly this is not helping. This is in the case of having 2 different scripts, doing 2 different things.

When the content of the scrollview is bigger than the rectangle it is inside, the scrollwheel of your mouse will automatically scroll the content. This is what I need to prevent while maintaining all the other controls, and I cannot do this by disabling the script.

1 Reply

· Add your reply
  • Sort: 
avatar image
6

Answer by Eldoir · Jan 08, 2018 at 10:48 PM

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!

alt text


screenshot.png (38.3 kB)
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kamyflex · Nov 17, 2019 at 11:33 AM 0
Share

Thank you.

avatar image makaka-org · May 22, 2021 at 05:46 PM 0
Share

cool, works!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I programmatically tween a Scroll View to a desired position? 0 Answers

Scroll view using Mesh 2 Answers

[Solved] need help regarding autolayout in scrollrect 1 Answer

Nested Scroll Views: How can I pass drag control from an inner scroll view to its outer scroll view? 2 Answers

Scrollable zooming list 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges