com.unity.uiextensions.nosa.../Examples/HSS-VSS-ScrollSnap/PaginationScript.cs

18 lines
413 B
C#

using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions.Examples
{
public class PaginationScript : MonoBehaviour, IPointerClickHandler
{
public HorizontalScrollSnap hss;
public int Page;
public void OnPointerClick(PointerEventData eventData)
{
if (hss != null)
{
hss.GoToScreen(Page);
}
}
}
}