2017-08-02 17:21:45 +08:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace UnityEngine.UI.Extensions.Examples
|
|
|
|
|
{
|
|
|
|
|
public class Example03Scene : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField]
|
2018-01-20 20:08:44 +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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|