Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfredo1995/recyclable-scroll-view
Recyclable ScrollView Infinite on Unity Engine, optimized to handle a large number of elements without compromising performance.
https://github.com/alfredo1995/recyclable-scroll-view
csharp mathematics objectpooling optimization-algorithms perfomance-optimization scriptableobject sharder unity
Last synced: 4 days ago
JSON representation
Recyclable ScrollView Infinite on Unity Engine, optimized to handle a large number of elements without compromising performance.
- Host: GitHub
- URL: https://github.com/alfredo1995/recyclable-scroll-view
- Owner: alfredo1995
- Created: 2024-05-07T13:39:39.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-14T17:49:29.000Z (10 days ago)
- Last Synced: 2025-01-14T19:16:48.305Z (10 days ago)
- Topics: csharp, mathematics, objectpooling, optimization-algorithms, perfomance-optimization, scriptableobject, sharder, unity
- Language: ShaderLab
- Homepage:
- Size: 10.4 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
https://github.com/alfredo1995/recyclable-scroll-view/assets/71193893/a8eeb87b-7a91-49e0-b19a-96e2ca49db6d
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.csControls 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.csInfinite 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