public class SCILLPagination : MonoBehaviour
This class handles pagination for the SCILLBattlePassLevels class. Not all levels fit into the screen, so they are paginated. Use this class to manage that.
This class offers two types of pagination. Via forward and backward buttons. And via pagination dots, where each dot stands for one page. This allows the user to quickly navigate to pages further away.
public int itemsPerPage = 5;
Often, the number of levels available in a battle pass cannot be rendered at once on the screen. Use this setting to
set the number of levels shown at once. Connect the
nextButton to implement pagination functionality.
public Button prevButton;
Connect a button which will be used to navigate to the previous page. It will be hidden if there is no previous page.
public Button nextButton;
Connect a button which will be used to navigate to the next page. It will be hidden if user has navigated to the last available page.
public Text pageText;
UnityEngine.UI.Text field which is used to set show the user the current navigation state, i.e. Page 1/10
public Transform paginationContainer;
Connect a transform that will be used as a container for the dots. Use HorizontalLayoutGroup for automatic layout on that container.
public GameObject dotButtonActivePagePrefab;
A prefab that will be used to render an active dot in the pagination dots list.
public GameObject dotButtonPrefab;
A prefab that will be used to render an inactive dot in the pagination dots list. This prefab must have a
component attached, but you do not need to attach a click event, as this class adds a listener to the correct internal
click handler function.