com.unity.uiextensions.nosa.../Examples/FancyScrollView/01_Basic/Example01ScrollView.cs

24 lines
610 B
C#
Raw Normal View History

using UnityEngine;
using System.Collections.Generic;
namespace UnityEngine.UI.Extensions.Examples
{
public class Example01ScrollView : FancyScrollView<Example01CellDto>
{
[SerializeField]
ScrollPositionController scrollPositionController = null;
void Awake()
{
scrollPositionController.OnUpdatePosition(p => UpdatePosition(p));
}
public void UpdateData(List<Example01CellDto> data)
{
cellData = data;
scrollPositionController.SetDataCount(cellData.Count);
UpdateContents();
}
}
}