Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UI builder ScrollView ignores scroll mode on phone.

Discussion in 'UI Toolkit' started by DasOhmoff, Jan 16, 2021.

  1. DasOhmoff

    DasOhmoff

    Joined:
    Nov 8, 2018
    Posts:
    11
    Hello, thank you for helping.

    On my smartphone (android), I open up my unity application and I can scroll both horizontally and vertically in ScrollViews, even though I set the scroll mode of the scroll view to vertical only.

    Neither the default option:
    upload_2021-1-16_17-19-15.png

    , nor setting it myself:
    upload_2021-1-16_17-19-59.png

    works. It always allows me to scroll horizontally on my phone.

    Also the touch scroll type is always reset to the following state automatically, now matter what I do:
    upload_2021-1-16_17-21-1.png
    This happens in the editor window, but the uxml file still has the correct value.

    How can I fix these things?
     
  2. DasOhmoff

    DasOhmoff

    Joined:
    Nov 8, 2018
    Posts:
    11
  3. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Yea this is an issue as well with iOS

    If you add a scroll view with the new phones you can literally scroll forever even though there is no content
     
  4. wethings

    wethings

    Joined:
    Aug 26, 2018
    Posts:
    28
    I've had this issue too. Weird thing is that I have another scrollview else where that is behaving properly, mode set to horizontal and scrolling only horizontally.

    I've compared all the values between both scrollviews and they are exactly the same but one of them can scroll horizontal and vertical even though mode is set to horizontal.

    Ended up copying the scrollview that behaves over to replace and it works now. Really buggy and finicky, I suggest trying to make a new scrollview and trying again?
     
    adammpolak likes this.
  5. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Thank yoU!
     
  6. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I have a similar issue on Windows Touch Monitors:
    I have several scroll views that are working correct, but there is one which is set to "Vertical" where i can touch-Scroll horizontal. But only about 20px. But that is even when there is no styles set to the scrollview at all, so copying from a working scroll should make no difference.
     
  7. Toothpiks

    Toothpiks

    Joined:
    Aug 31, 2021
    Posts:
    1
    I was having this exact same issue, I know this is a old thread but incase anyone runs into it dealing with this issue I was able to resolve it by setting the content in #unity-content-container to have 99% width. stopped the wierd wiggle that was happening
     
    manuelgoellnitz likes this.
  8. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    Nice!
    For me the problem is not gone completly but reduced to about 3 px.