Unity infinite scroller (UIS) is an extension allows you to use the ScrollRect control as an infinite scroller/spinner
Quick start ยท Documentation ยท Report Bug
This extension allows you to use the ScrollRect
control as an infinite scroller/spinner. It is a fast, easy and mobile-friendly way to create lists with thousands of rows without lags and jitters.
In Unity, you can use the ScrollRect
control to scroll multiple objects in the UI. But when there are too many objects in the container, you will see lags and jitter when scrolling.
This script uses a data-driven method to scroll and display list items. This means that you have the data of the list items and their height or width, and the script creates and shows only those items that fit on the screen. When you want to scroll the list, the list items at the top or bottom move in opposite directions.
pull-to-refresh
featurescroll-to
featureGet it from releases page or add the line to Packages/manifest.json
and module will be installed directly from Git url:
"com.mopsicus.uis": "https://github.com/mopsicus/uis.git",
See the samples section to get a demo app. This demo contains 6 scenes with different ways to use UIS. It will show you how to initiate and use it in your app, how to use pull-to-refresh feature, how to use lists with different height/width of elements.
Tested in Unity 2020.3.x.
UIS
to uses sectionScroll View
component to game object on UI canvasScroller
script after itusing UIS;
using UnityEngine;
public class Demo : MonoBehaviour {
[SerializeField]
Scroller List = null;
/// </summary>
void Start() {
List.OnFill += OnFillItem;
List.OnHeight += OnHeightItem;
List.InitData(100);
}
void OnFillItem(int index, GameObject item) {
// get data from your storage, JSON, etc
//
// var data = jsonArray[index]; for example
//
// fill list item
//
// item.GetComponent<ItemController>().Set(data);
}
int OnHeightItem(int index) {
// get item height from your storage, JSON, etc
// or calc it here and return
//
return 100;
}
}
Read the docs for more details.
We invite you to contribute and help improve UIS. Please see contributing document. ๐ค
You also can contribute to the uis project by:
For a better experience, you can set up an environment for local development. Since this project is developed with VS Code, all settings are provided for it.
Monokai Pro
or eppz!
themeFiraCode
fontInlay Hints
in C# extensionVisual Studio Editor
package in Unity.editorconfig
in root project directoryYou can support the project by using any of the ways below:
Before you ask a question, it is best to search for existing issues that might help you. Anyway, you can ask any questions and send suggestions by email or Telegram.
UIS is licensed under the MIT License. Use it for free and be happy. ๐