Class VerticalUnlimitedScroller
Inheritance
Implements
Namespace: UnlimitedScrollUI
Assembly: cs.temp.dll.dll
Syntax
public class VerticalUnlimitedScroller : VerticalLayoutGroup, IUnlimitedScroller
Fields
cacheSize
Max size of cached cells.
Declaration
public uint cacheSize
Field Value
| Type | Description |
|---|---|
| uint |
scrollRect
The ScrollRect component on ScrollView.
Declaration
public ScrollRect scrollRect
Field Value
| Type | Description |
|---|---|
| ScrollRect |
Properties
CellPerRow
The calculated real number of cells per row or columns count.
Declaration
public int CellPerRow { get; }
Property Value
| Type | Description |
|---|---|
| int |
ContentHeight
The height of the content.
Declaration
public float ContentHeight { get; }
Property Value
| Type | Description |
|---|---|
| float |
ContentWidth
The width of the content.
Declaration
public float ContentWidth { get; }
Property Value
| Type | Description |
|---|---|
| float |
FirstCol
The first visible column.
Declaration
public int FirstCol { get; }
Property Value
| Type | Description |
|---|---|
| int |
FirstRow
The first visible row.
Declaration
public int FirstRow { get; }
Property Value
| Type | Description |
|---|---|
| int |
Generated
Whether this scroller has initialized and generate cells.
Declaration
public bool Generated { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Initialized
Whether this scroller has initialized.
Declaration
public bool Initialized { get; }
Property Value
| Type | Description |
|---|---|
| bool |
LastCol
The last visible column.
Declaration
public int LastCol { get; }
Property Value
| Type | Description |
|---|---|
| int |
LastRow
The last visible row.
Declaration
public int LastRow { get; }
Property Value
| Type | Description |
|---|---|
| int |
RowCount
Total row count.
Declaration
public int RowCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
ViewportHeight
The height of the viewport.
Declaration
public float ViewportHeight { get; }
Property Value
| Type | Description |
|---|---|
| float |
ViewportWidth
The width of the viewport.
Declaration
public float ViewportWidth { get; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Clear()
Clear all cells including cache.
Declaration
public void Clear()
ClearCache()
Clear all cached cells. This will not change the cache size.
Declaration
public void ClearCache()
Generate(GameObject, int, Action<int, ICell>)
Call this function to initialize and generate cells.
Declaration
public void Generate(GameObject newCell, int newTotalCount, Action<int, ICell> onGenerate)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | newCell | The cell game object. |
| int | newTotalCount | The total cell count you want to generate. |
| Action<, ><int, ICell> | onGenerate | The delegate when the cell is generated, you can initialize cell data here. |
JumpTo(uint, JumpToMethod)
Declaration
public void JumpTo(uint index, JumpToMethod method)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | index | |
| JumpToMethod | method |
SetCacheSize(uint)
Set a new caching size. If smaller than current cache size, cache will be trimmed to the new size
Declaration
public void SetCacheSize(uint newSize)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | newSize | New cache size. |