コード例 #1
0
    public ScrollViewItem GetCellView(InfinateScroll scroller, int dataIndex, int cellIndex)
    {
        ScrollViewItem cellView = scroller.GetCellView(prefab);

        if (cellView == null)
        {
            return(null);
        }
        cellView.GetComponentInChildren <Text>().text = datas[dataIndex];
        cellView.gameObject.SetActive(true);
        return(cellView);
    }
コード例 #2
0
 public int GetNumberOfCells(InfinateScroll scroller)
 {
     return(datas.Count);
 }
コード例 #3
0
 public float GetCellViewSize(InfinateScroll scroller, int dataIndex)
 {
     return(50);
 }