An ListView implementation for Unityโs UI that recycles item views, designed to handle large data sets efficiently.
- Seamless infinite (or large-scale) scrolling of UI lists.
- Supports vertical, horizontal layouts with reverse arrangments.
- Supports grid layouts with start axes and corners.
- Supports pages layouts (like TikTok).
- Reuses (recycles) item views instead of creating/destroying repeatedly.
- Supports multiple gameObject prototypes.
- Supports unknown item sizes with dynamic layout recalculation.
- Supports extra visible items for smoother scrolling.
- Supports reloading of data source.
If you have the OpenUPM CLI installed, run this command in your Unity project root:
openupm add com.migzro.recyclablescrollrect- Open 'Edit / Project Settings / Package Manager'.
- Add a new Scoped Registry with
- Name:
OpenUPM - URL:
https://package.openupm.com - Scope(s):
com.migzro.recyclablescrollrect
- Name:
- Go to 'Window / Package Manager / Packages / My Registries'.
- Install the Recyclable Scroll Rect package.
You can also add it manually by editing your manifest.json file:
"scopedRegistries": [
{
"name": "OpenUPM",
"url": "https://package.openupm.com",
"scopes": [
"com.migzro.recyclablescrollrect"
]
}
]Download the latest Unity package from the Releases page.
After installing via Package Manager, go to Window > Package Manager, select Recyclable Scroll Rect, and click Samples tab to import any demo.
Open the sample scenes located in Assets/Recyclable Scroll Rect/Samples to see examples of vertical, horizontal, grid, and paged layouts.
- Add the required
RSRcomponent to aScrollRectGameObject. - Implement the
IDataSourceinterface in a MonoBehaviour script to provide data and item views.
public class VerticalRSRDemo : MonoBehaviour, IRSRDataSource
{
[SerializeField] private int _itemsCount;
[SerializeField] private RSR _scrollRect;
[SerializeField] private GameObject[] _prototypeItems;
private List<string> _dataSource;
private int _itemCount;
public int ItemsCount => _itemsCount;
public bool IsItemSizeKnown => true;
public GameObject[] PrototypeItems => _prototypeItems;
private void Start()
{
_dataSource = new List<string>();
for (var i = 0; i < _itemsCount; i++)
_dataSource.Add(i.ToString());
_scrollRect.Initialize(this);
}
public float GetItemSize(int itemIndex)
{
return 40.22f;
}
public void SetItemData(IItem item, int itemIndex)
{
(item as DemoItemPrototype)?.Initialize(_dataSource[itemIndex]);
}
public void ItemHidden(IItem item, int itemIndex)
{
}
public GameObject GetItemPrototype(int itemIndex)
{
if (itemIndex % 2 == 0)
return _prototypeItems[0];
return _prototypeItems[1];
}
public void ItemCreated(int itemIndex, IItem item, GameObject itemGo)
{
}
public bool IsItemStatic(int itemIndex)
{
return false;
}
public void ScrolledToItem(IItem item, int itemIndex)
{
}
public bool IgnoreContentPadding(int itemIndex)
{
return false;
}
public void PullToRefresh()
{
}
public void PushToClose()
{
}
public void ReachedScrollStart()
{
}
public void ReachedScrollEnd()
{
}
public void LastItemIsVisible()
{
}
}
}Hereโs whatโs planned for upcoming releases of Recyclable Scroll Rect:
- Sections with headers and footers
- Support for carousel mode
For large lists or grids (hundreds/thousands of items), regular UI instantiation is heavy.
This component reuses item views to keep performance smooth and memory low.
- Chat message lists
- Inventories
- Infinite scrolling feeds
- Thumbnail grids
See CHANGELOG.md for details.
MIT License โ see LICENSE.md.
Open an issue on GitHub for help or feature requests.
If this tool helped you, consider buying me a coffee:
Thanks for using Recyclable Scroll Rect โ happy scrolling! ๐






