Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Scrollview: Disable scroll on PointerDown [only scroll when dragging the scrollbar]

Discussion in 'UGUI & TextMesh Pro' started by drandev, Mar 23, 2020.

  1. drandev

    drandev

    Joined:
    Mar 23, 2020
    Posts:
    10
    Is there a way I could only scroll whenever I am dragging the scrollbar?
    It's really annoying when you click any part of the scrollbar and the scroll view just auto scrolls based on where your cursor's location on the scrollbar is.
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,078
    I think this should be easily solvable by disable "Raycast Target" on the Image of the Scrollbar background. This way, clicks are not detected on that part anymore, so, it shouldn't trigger the jump logic.
     
    drandev likes this.
  3. drandev

    drandev

    Joined:
    Mar 23, 2020
    Posts:
    10
    Thanks for the reply. Sadly there is no raycast in either the scrollbar background, scroll bar, or even the viewport. I however managed to "ease" it a bit by changing the movement type to clamped and disabled the Inertia feature.