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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Canvas pixel-perfect break the scroll

Discussion in 'UGUI & TextMesh Pro' started by Hapciupalit, Dec 15, 2017.

  1. Hapciupalit

    Hapciupalit

    Joined:
    Apr 24, 2015
    Posts:
    103
    So I've been struggling for a few day now with this problem and I cannot understand what could be the problem of this.

    Here is a link of the problem


    If you have any ideas what could be the problem or if I could get the quality of the pixel-perfect another way, please tell me.

    Thank you!
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,533
    It was the unused but active Vertical Layout Group on the ScrollRect. :) I believe removing it fixed the issue, right?
     
  3. Hapciupalit

    Hapciupalit

    Joined:
    Apr 24, 2015
    Posts:
    103
    I saw that after, but I didn't know how to delete the post
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,533
    The answer may help other people. I searched the forum myself before I figured out the problem. :)

    To sum it up for future readers: When the canvas is set to pixel perfect, layout groups on the ScrollRect itself make the ScrollRect always jump to the top, so you can't actually scroll. The solution is to not put a layout group on the ScrollRect itself.
     
    Hapciupalit likes this.
  5. SplenShepard

    SplenShepard

    Joined:
    Aug 24, 2019
    Posts:
    16
    Is this considered a bug? Really highly annoying that this problem persists even when the canvas render mode is set to overlay. According to the docs https://docs.unity3d.com/ScriptReference/Canvas-pixelPerfect.html this option is only supposed to make a difference in screen space render mode. I'm not even sure why this is a problem at all.