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 Example02Scene : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField]
|
2018-12-31 23:16:28 +08:00
|
|
|
|
Example02ScrollView scrollView;
|
2017-08-02 17:21:45 +08:00
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
var cellData = Enumerable.Range(0, 20)
|
|
|
|
|
.Select(i => new Example02CellDto { Message = "Cell " + i })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
scrollView.UpdateData(cellData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|