Paginator
Important
ScrollRect.Content anchors should be setted to top left corner.
How to select paginator
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.
Options
ScrollRect
ScrollRectScrollRect to work with.
Default Page
RectTransformoptionalTemplate GameObject to display inactive pages.
Active Page
RectTransformoptionalTemplate GameObject to display active page.
Prev Page
RectTransformoptionalGameObject, go to the previous page.
Next Page
RectTransformoptionalGameObject, go to the next page.
Direction
PaginatorDirectionScroll direction.
Autodetect direction by ScrollRect settings and ScrollRect.content size.Horizontalscroll in the horizontal directionVerticalscroll in the vertical direction
Fast Drag Distance
floatScroll 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
floatScroll 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.
Forced Position
PaginatorPagePositionAutomatically scroll to the nearest page after drag ended if not meet Fast Drag condition.
Noneautomatical scroll disabledOnStartautomatical scroll enabled; page aligned by the left side of the ScrollRect (or the top side if scroll in the vertical direction)OnCenterautomatical scroll enabled; page aligned by the center side of the ScrollRectOnEndautomatical scroll enabled; page aligned by the right side of the ScrollRect (or the bottom side if scroll in the vertical direction)
Animation
boolEnable animation.
Current Page
intDefault page.
Events
OnPageSelect
UnityEvent<int>
ScrollRectPaginator Options
Page Size Type
PageSizeTypeIf Page Size Type = Auto page size is equal to scroll rect size, if Page Size Type = Fixed will be used Page Size value.
AutoFixed
Page Size
floatSize of the page.
Page Spacing
floatSpace between pages.
Movement
AnimationCurveAnimation curve.
Unscaled Time
boolRun animation with unscaled time.
ListViewPaginator Options
PerPage
intItems count on one page, for TileView this is rows or columns count per page.
ListViewPaginator works with ListLiew, 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.