2017-08-02 17:21:45 +08:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace UnityEngine.UI.Extensions.Examples
|
|
|
|
|
{
|
|
|
|
|
public class Example01Scene : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField]
|
2018-01-20 20:08:44 +08:00
|
|
|
|
Example01ScrollView scrollView = null;
|
2017-08-02 17:21:45 +08:00
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
var cellData = Enumerable.Range(0, 20)
|
|
|
|
|
.Select(i => new Example01CellDto { Message = "Cell " + i })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
scrollView.UpdateData(cellData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|