These scripts will make your UGUI ScrollRect reusing cells, to improve performance, loading time and draw calls.
See the codeThese scripts help make your ScrollRect Reusable, because it will only build cells when needed. If you have a large number of cells in a scroll rect, you absolutely need it! It will save a lot of time loading and draw call, along with memory in use, while still working smoothly.
中文说明请看这里。
openupm add me.qiankanglai.loopscrollrect with OpenUPM, or open Package Manager and Add package from git URL https://github.com/qiankanglai/LoopScrollRect.git.
Please refer to DemoScene for quick startup.


LoopScrollRect with mask disabled.

More complex example can be found in DemoScene_MultiCell.
DemoSceneSingle tests LoopScrollRects which are not fully filled.
Please refer to InitOnStart.cs for simplest example usage:
LoopScrollPrefabSource for providing different cells, and it's high recommended for using cache pool.LoopScrollDataSource for providing data for specified cell.Also refer to SizeHelper.cs if you are using cells with different sizes:
LoopScrollSizeHelper for providing precise cell sizes.The cell needs preferred width&height in Layout Properties when calculating layout. The easiest way is attaching Layout Element and setting preferred width&height.

Also cell needs to be attached with script receiving void ScrollCellIndex (int idx).
Apart from implementing interfaces above, other staffs are provided in Inspector for quick test.

Total Count: How many cells in total? Negative number means infinity.
Reverse Direction: If you need scrolling from down to top(vertical) or right to left(horizontal), enable this and adjust Content's pivot&Anchor.
Basic Usage
Refill Test
RefillFromEnd Test
Scroll Test
1,438 followers · starred Mar 2020
105 followers · starred Aug 2018
10 followers · starred Nov 2016
8 followers · starred Oct 2020
These scripts will make your UGUI ScrollRect reusing cells, to improve performance, loading time and draw calls.
See the codeThese scripts help make your ScrollRect Reusable, because it will only build cells when needed. If you have a large number of cells in a scroll rect, you absolutely need it! It will save a lot of time loading and draw call, along with memory in use, while still working smoothly.
中文说明请看这里。
openupm add me.qiankanglai.loopscrollrect with OpenUPM, or open Package Manager and Add package from git URL https://github.com/qiankanglai/LoopScrollRect.git.
Please refer to DemoScene for quick startup.


LoopScrollRect with mask disabled.

More complex example can be found in DemoScene_MultiCell.
DemoSceneSingle tests LoopScrollRects which are not fully filled.
Please refer to InitOnStart.cs for simplest example usage:
LoopScrollPrefabSource for providing different cells, and it's high recommended for using cache pool.LoopScrollDataSource for providing data for specified cell.Also refer to SizeHelper.cs if you are using cells with different sizes:
LoopScrollSizeHelper for providing precise cell sizes.The cell needs preferred width&height in Layout Properties when calculating layout. The easiest way is attaching Layout Element and setting preferred width&height.

Also cell needs to be attached with script receiving void ScrollCellIndex (int idx).
Apart from implementing interfaces above, other staffs are provided in Inspector for quick test.

Total Count: How many cells in total? Negative number means infinity.
Reverse Direction: If you need scrolling from down to top(vertical) or right to left(horizontal), enable this and adjust Content's pivot&Anchor.
Basic Usage
Refill Test
RefillFromEnd Test
Scroll Test
1,438 followers · starred Mar 2020
105 followers · starred Aug 2018
10 followers · starred Nov 2016
8 followers · starred Oct 2020