Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UI.Pagination;
- public class TestPagedRect : MonoBehaviour
- {
- void Start()
- {
- var pagedRect = this.GetComponent<PagedRect>();
- // Hide the page numbers on the buttons
- pagedRect.SetShowPageNumbersOnButtons(false);
- // Show the page titles on the buttons
- pagedRect.SetShowPageTitlesOnButtons(true);
- Debug.Log("The current page number is " + pagedRect.CurrentPage);
- // Change the current page
- pagedRect.SetCurrentPage(4);
- Debug.Log("The current page number is " + pagedRect.CurrentPage);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement