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

Unity UI ScrollRect scroll to item in view

Discussion in 'UGUI & TextMesh Pro' started by the_mr_matt, Jul 30, 2020.

  1. the_mr_matt

    the_mr_matt

    Joined:
    Jul 21, 2015
    Posts:
    124
    I've seen posts like this where a scroll rect will snap to a specific item. However this attempts to move the content panel up to the very top, even if the target item is at the bottom. The result forces the scroll bar beyond the size of the content panel itself.

    How can I snap to an item just enough that it comes into view?