Skip to content

Recyclable ScrollView Infinite on Unity Engine, optimized to handle a large number of elements without compromising performance.

Notifications You must be signed in to change notification settings

alfredo1995/recyclable-scroll-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-infinite-reusable-scrollview.mp4

Infinite and Recyclable ScrollView for Mobile and Desktop WebGL Apps

ScrollRectPool.cs

Manages a pool of objects (represented by GameObjects) in a ScrollRect, allowing you to activate objects as needed to avoid frequent object creation and destruction, which can be more efficient in terms of performance.

Item.cs

Controls the behavior of an item in the scene, allowing it to be activated, deactivated, and have its text updated as needed. Keeps track of whether the item is visible or invisible, for managing the object pool system.

ItemList.cs

Using ScriptableObject to create a custom data type called ItemList that is being used to store a list of strings.

InfiniteScroll.cs

Infinite scroll logic for a list of items in a ScrollRect, moving the items up or down, and updating the visible items with new data from the item list.

CheckVisibility.cs

Managing the visibility of items in a list within a ScrollRect, activating and deactivating (Object Pooling) the items as they enter and leave the visible area of ​​the list (interacts with the InfiniteScroll component to handle infinite scrolling of the list).

Optimization techniques applied and results obtained.

Avoiding frequent memory allocation and deallocation, reducing garbage collector overhead.

Singleton for single instance management. Avoiding multiple unnecessary memory allocations for the same object and simplifying global state management.

Optimizing the object pool and ensuring that unused elements are disabled when they are off-screen to reduce resource usage.

Checks whether an item is visible or not, such as calculating the position of the item and the visible corners of the list.

Avoiding unnecessary or complex calculations that could negatively impact performance.

Running the Project

Installing the Unity Editor

install the Unity Editor version 2022:3.27

Clone the repository:

Find and select the desired cloning method, such as HTTPS or SSH (Copy Clone URL)

Running the application:

Access the URL below to download and run the APK (Android) or IPA (iOS) file on your device.

> https://abre.ai/apk-scroll

About

Recyclable ScrollView Infinite on Unity Engine, optimized to handle a large number of elements without compromising performance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published