A complete framework for implementing highly customizable, ScrollRect-based ListViews and GridViews, or optimizing your already-existing ones.
Useful for chat systems, leaderboards, galleries, inventories, view pagers, spinners, hierarchies, date/time pickers etc.
Starting with v3.2, a GUI is provided to help you generate a ScrollView from scratch in editor, a scrollbar and a SRIA implementation based on 2 available templates: List or Grid
Features:
- platform-independent (uses UnityEngine.UI.ScrollRect)
- can handle around 10 million items on mobile
- variable data set
- items can have different heights/widths
- support for Content Size Fitter for items with unknown size at init time
- GridView
- vertical/horizontal orientation and optional spacing/padding
- rotating/scaling the ScrollView (making it compatible with CanvasScaler)
- no objects are destroyed (unless the number of items in the dataset changes), so GC calls are at minimum
- fully configurable snapping behavior
- auto-adapting to changes in viewport's size
- multiple item types + example scene
- change item size in real time (like for animations), even if it's not visible
- optionally looping items (useful for things like spinners)
- ScrollTo specific item with fine position adjusting & SmoothScrollTo with adjustable duration for the animation + a callback can be provided for receiving updates for each animation step and the possibility of canceling it
- fully extensible & documented source code provided
- can run visibility computations each frame via MonoBehaviour.Update OR only when OnScroll event triggers OR in both cases (default)
- optional customizable recycling policy (callbacks are provided)
- enhanced scrollbar functionalities via ScrollbarFixer, which also solves this Unity bug) and adds auto-hide/hide-when-not-needed animations