Vietnamese


https://github.com/son24tuoi/circular-scroll-unity.git


Allows users to scroll through content and loop infinitely when reaching the end of the list.

The scroll system optimizes performance by reusing UI elements (GameObjects). Instead of instantiating thousands of objects—which consumes RAM and slows down CPU processing—this system maintains only a small number of elements sufficient to display on the screen and updates their data as the user scrolls.

Key Features

Comparison with Traditional Methods

Criteria Traditional Scroll Reusable Scroll
Number of Objects Equal to the total amount of data → the more data, the more objects. Fixed, typically twice the number visible in the viewport.
RAM usage Increases gradually with data Low and stable

Operating principle

Quick setup guide

  1. Attach theCircularScrollVertical.cs/CircularScrollHorizontal.csscript tothe GameObjectcontainingthe ScrollRect(you can place it elsewhere too 😅).
  2. Drag theScrollRectandContentRTvariables forCircularScrollVertical.cs/CircularScrollHorizontal.csonto the Inspector window. Set the maximum number of list items to display inTotalItems(or set it via code). Other variables displayed in the Inspector will update automatically.
  3. Configure the UI items in the list as child objects of theContentgame object (make sure there are just enough to fill the viewport)