• Stars
    star
    305
  • Rank 136,226 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created about 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dynamic scrollView based on UGUI

ScrollView

基于UGUI的动态滚动列表,主要支持以下功能:

  1. 继承自UGUI的SrollRect,支持ScrollRect的所有功能;

  2. 使用对象池来管理列表元素,以实现列表元素的复用;

  3. 支持一行多个元素或一列多个元素;

  4. 可使用不同尺寸的列表元素;

  5. 列表数据变化后动态刷新列表元素;

用法详见工程中附带的示例,场景Scene中的Canvas1及脚本TestScript

test.gif

ScrollViewEx

当item数量巨大时,可以使用ScrollViewEx

ScrollViewEx继承了ScrollView的所有功能,并进行了针对性的优化,它会对item进行分页,设置适当的页面尺寸可以得到更好的性能表现,详见场景Scene中的Canvas2,及脚本TestLargeAmount.cs

以下是当有50000个item时使用ScrollViewScrollViewEx,并指定页面尺寸30:

test2.gif

当随机地添加、删除数据或随机跳转时二者耗时:

test3.png


ScrollView

A DynamicScrollView component based on UGUI that has the following features:

  1. Extented from SrollRect(UGUI class), so supports all the functions of ScrollRect;

  2. Scroll items are managed by an object pool so they can be recycled and reused;

  3. More than one items in one row (or column) is supported;

  4. Items can have different sizes;

  5. Items can be updated when scrollview data change;

For more details please run the test case: active Canvas1 in Scene and play or read TestScript.

test.gif

ScrollViewEx

When there is a large number of items, ScrollViewEx is recommended.

ScrollViewEx inherits all the features of ScrollView and is optimized for handling massive items by pagination. An appropriate pageSize will result in better performance, see Canvas2 in scene Scene and script TestLargeAmount.cs for details.

The following case shows that a ScrollView and a ScrollViewEx are both working with 50000 items and the latter has a pageSize of 30:

test2.gif

The time cost for random add/remove/scrollTo operation:

test3.png

More Repositories

1

UISoftMask

Soft mask based on UGUI
C#
66
star
2

DragDropComponents

DragDrop components based on UGUI
C#
54
star
3

EasyObstacleAvoidance

KD-tree and obstacle avoidance implementation in C#
C#
52
star
4

unity3d-shader-collection

A unity shader collection of private works
ShaderLab
44
star
5

UnityRadialLayoutGroup

A radial layout group component base on UGUI with very easy angle and radius control.
C#
44
star
6

EasyTimeSlicing

EasyTimeSlicing makes it easy to slice heavy tasks into consequent game frames to execute and helps to keep the game running smoothly and avoid janks or spikes.
C#
39
star
7

EasyBehaviorTree

A very simple behavior tree implementation including a creator and runtime codes
C#
30
star
8

RVO2-Unity

ORCA(Optimal Reciprocal Collision Avoidance) in Unity.
C#
17
star
9

UnityLOS2D

A simple Line of Sight (LOS) implementation with Unity physics ray casting system
C#
11
star
10

bitmap-font-generator

Generate BMFont with one click
Python
10
star
11

UnityBillboardBatching

C#
10
star
12

tableext

A set of functions that extend lua table operation
Lua
8
star
13

app-icon-generator

Generate icons for iOS and Android apps
Python
6
star
14

EasyScheduler

C#
6
star
15

ScriptableObjectCreator

A super handy window for quick creation of any type of Unity Scriptable Object assets
C#
5
star
16

TiledMapEditor

Editor for tiled map data, simple and easy.
C#
5
star
17

UnitySDFImage

UnitySDFImage is based on the general SDF algorithm, with some customization for better integration with UGUI, and facilitates the editing and runtime controlling of animation and effects.
C#
5
star
18

SkinnedMeshBatching

C#
4
star
19

EasyBindings

C#
4
star
20

UIFadingText

C#
4
star
21

LoadRunner-protobuf-demo

Use protobuf in LoadRunner
C++
3
star
22

TMPSpriteAssetCreator

A UnityEditor tool helps simplify the creation of TMPSpriteAssets.
C#
3
star
23

unity3d-shaders-practice

Exercises following the book 《Unity Shader入门精要》
ShaderLab
3
star
24

UnitySerializableDictionary

C#
3
star
25

EasyEvent

C#
2
star
26

EasyDQN

A simple DQN implementation in Unity3D.
C#
2
star
27

lua-structs

Lua
2
star
28

CSGeometries

C#
2
star
29

match-three-game

A simple match-three game demo based on cocos2d-js v3.13
JavaScript
1
star
30

Unity-gRPC-python

C#
1
star
31

MathUtils

1
star
32

aillieo.github.io

aillieo blog
HTML
1
star
33

EasyGOAP

C#
1
star
34

CSFixedPoint

C#
1
star
35

EasyEditor

C#
1
star
36

EasyObjectPool

C#
1
star
37

UnityEmbeddedServers

C#
1
star
38

CullingScrollRect

C#
1
star
39

UnityGameOfLife

C#
1
star
40

UnityAIGCMUD

C#
1
star
41

UnityAnimatorEvents

C#
1
star
42

UnityFileUtils

C#
1
star
43

lua-cpp-cs-interaction

lua-cpp-cs-interaction
C
1
star
44

EasyPBR

1
star
45

TextBoundingImage

1
star
46

UE4TD

My first UE4 project.
1
star
47

Zelda-TotK-Recall-recreation

C#
1
star
48

UnitySerializableFunc

C#
1
star