2017-08-02 17:21:45 +08:00
|
|
|
|
using System.Linq;
|
2018-12-31 23:16:28 +08:00
|
|
|
|
using UnityEngine;
|
2017-08-02 17:21:45 +08:00
|
|
|
|
|
|
|
|
|
namespace UnityEngine.UI.Extensions.Examples
|
|
|
|
|
{
|
|
|
|
|
public class Example03Scene : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField]
|
2019-03-08 02:11:51 +08:00
|
|
|
|
Example03ScrollView scrollView = null;
|
2017-08-02 17:21:45 +08:00
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
var cellData = Enumerable.Range(0, 20)
|
|
|
|
|
.Select(i => new Example03CellDto { Message = "Cell " + i })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
scrollView.UpdateData(cellData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|