Unlimited Scroller

Code & Tool: Unity, C#

Favorites and Stars: 100+

Downloads: 2000+

GitHub: https://github.com/Brian-Jiang/UnlimitedScrollUI

Unity Asset Store: https://u3d.as/2z2a

OpenUPM: openupm.com/packages/com.xiaojiang.unlimitedscroller

UnlimitedScroller is a powerful Unity plugin designed to optimize and simplify the creation of scroll views with unlimited items, significantly improving performance and memory usage in large UI lists. Whether you are working with Horizontal, Vertical, or Grid layouts, UnlimitedScroller dynamically manages content, ensuring that only the visible items in the scroll view are generated, while off-screen items are efficiently destroyed or cached for later use.

This plugin is ideal for UI elements like:

  • Backpacks
  • Leaderboards
  • Shops
  • Skill lists

By using UnlimitedScroller, you can handle UI components with potentially hundreds of items while reducing memory consumption and speeding up your workflow.

Key Features:

  • Dynamic Cell Management: Automatically spawns cells before they appear in the viewport and destroys them when they scroll out of view.
  • Freeform Layout: Supports free dragging in any direction for horizontal, vertical, or grid layouts.
  • Optimized for Performance: Core functionality includes calculating scroll view padding and cell indices to ensure only visible cells are spawned. This improves both CPU and memory performance.
  • LRU Cache System: Invisible cells are cached using a Least Recently Used (LRU) algorithm, allowing for faster reuse without immediate destruction, ensuring smoother performance.
  • Customizable Layouts: Supports defining padding, cell size, spacing, and cache size. It also allows for explicit control over the number of cells per row.

Simple Setup: Integrating UnlimitedScroller into your project is as simple as using a standard layout group in Unity, making it accessible to developers of all skill levels. An simple setup is shown below.

Technical Details: When working with large scroll views—like a backpack with many items—you only see a small portion of the items at a time. UnlimitedScroller efficiently manages this by only spawning the visible cells. It calculates the padding as the user scrolls and dynamically adjusts the content to load only the necessary parts as shown in diagram below. The LRU cache further optimizes performance by keeping invisible cells in memory for reuse, reducing the overhead of recreating game objects.

Auto-Generated Documentation: UnlimitedScroller also includes auto-generated documentation powered by Docfx. The documentation is continually updated through a GitHub workflow that also serves as a validation mechanism for merges. You can access the full documentation here.

By integrating UnlimitedScroller, developers can improve the efficiency and performance of large scroll views, reduce memory usage, and streamline UI development in Unity.