Paginator

Important

ScrollRect.Content anchors should at the top left corner.

How to select paginator

  • If you need paginator for the TextMeshPro text with Overflow = Page use TextMeshProPaginator

  • If you need paginator with fixed items quantity per page use ListViewPaginator.

  • If you need paginator where the page size is equal ScrollRect size use ScrollRectPaginator. Add TileViewScrollRectFitter if you also need the whole number of items on one page.

  • Use ScrollRectPaginator for any ScrollRect outside ListView, TileView etc.

Common Options

  • View PaginatorView

    • Default Page ScrollRectPage optional

      Template GameObject to display inactive pages.

    • Active Page ScrollRectPage optional

      Template GameObject to display active page.

    • Prev Page ScrollRectPage optional

      GameObject, go to the previous page.

    • Next Page ScrollRectPage optional

      GameObject, go to the next page.

    • Skip Page RectTransform optional

      Template to display skipped pages.

    • Pages Container RectTransform optional

      Container for the created Default Page instances.

    • HideIfOnePage bool

      Hide active page if has only one page.

    • Visible Pages Count int

      Number of visible page buttons.
      The first and last page buttons are always shown.
      Set to 0 to display buttons for all pages.

Common Events

  • OnPageSelect UnityEvent<int>

ScrollRectPaginator Options

  • ScrollRect ScrollRect

    ScrollRect to work with.

  • Direction PaginatorDirection

    Scroll direction.

    • Auto detect direction by ScrollRect settings and ScrollRect.content size.

    • Horizontal scroll in the horizontal direction

    • Vertical scroll in the vertical direction

  • Fast Drag Distance float

    Scroll to the next or previous page if drag distance more than Fast Drag Distance and drag time less than Fast Drag Time. Set zero to disable.

  • Fast Drag Time float

    Scroll to the next or previous page if drag distance more than Fast Drag Distance and drag time less than Fast Drag Time. Set zero to disable.

  • Current Page int

    Default page.

  • Forced Position PaginatorPagePosition

    Automatically scroll to the nearest page after drag ended if not meet Fast Drag condition.

    • None automatical scroll disabled

    • OnStart automatical scroll enabled; page aligned by the left side of the ScrollRect (or the top side if scroll in the vertical direction)

    • OnCenter automatical scroll enabled; page aligned by the center side of the ScrollRect

    • OnEnd automatical scroll enabled; page aligned by the right side of the ScrollRect (or the bottom side if scroll in the vertical direction)

  • Last Page Full Size bool

    Change the last page size to full-page size.

  • Page Rounding PaginatorRounding

    • Floor

    • Round

    • Ceil

  • Animation bool

    Enable animation.

  • Page Size Type PageSizeType

    If Page Size Type = Auto page size is equal to scroll rect size, if Page Size Type = Fixed will be used Page Size value.

    • Auto

    • Fixed

  • Page Size float

    Size of the page.

  • Page Spacing float

    Space between pages.

  • Movement AnimationCurve

    Animation curve.

  • Unscaled Time bool

    Run animation with unscaled time.

ListViewPaginator Options

  • List View ListViewBase

  • Per Page int

    Items count on one page, for TileView this is rows or columns count per page.

  • Fast Drag Distance float

    Scroll to the next or previous page if drag distance more than Fast Drag Distance and drag time less than Fast Drag Time. Set zero to disable.

  • Fast Drag Time float

    Scroll to the next or previous page if drag distance more than Fast Drag Distance and drag time less than Fast Drag Time. Set zero to disable.

  • Current Page int

    Default page.

  • Forced Position PaginatorPagePosition

    Automatically scroll to the nearest page after drag ended if not meet Fast Drag condition.

    • None automatical scroll disabled

    • OnStart automatical scroll enabled; page aligned by the left side of the ScrollRect (or the top side if scroll in the vertical direction)

    • OnCenter automatical scroll enabled; page aligned by the center side of the ScrollRect

    • OnEnd automatical scroll enabled; page aligned by the right side of the ScrollRect (or the bottom side if scroll in the vertical direction)

  • Last Page Full Size bool

    Change the last page size to full-page size.

  • Page Rounding PaginatorRounding

    • Floor

    • Round

    • Ceil

  • Animation bool

    Enable animation.

ListViewPaginator works with ListView, TileView (in this case PerPage is rows or columns count) and TreeView. ListView animation settings used if animation enabled.

Animation

Animation work with AnimationCurve. Width is the length of the animation in seconds; height is a relative distance (0 is start position; 1 is end position).

ScrollRectPaginator use own Movement field. ListViewPaginator uses ListView.ScrollMovement field.

Tile View ScrollRect Fitter

Component to resize ListView.ScrollRect to fit the whole number of columns and rows.