Advertisement
Guest User

Untitled

a guest
May 30th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using UnityEngine;
  2. using UI.Pagination;
  3.  
  4. public class TestPagedRect : MonoBehaviour
  5. {
  6.     void Start()
  7.     {
  8.         var pagedRect = this.GetComponent<PagedRect>();
  9.  
  10.         // Hide the page numbers on the buttons
  11.         pagedRect.SetShowPageNumbersOnButtons(false);
  12.  
  13.         // Show the page titles on the buttons
  14.         pagedRect.SetShowPageTitlesOnButtons(true);
  15.  
  16.         Debug.Log("The current page number is " + pagedRect.CurrentPage);
  17.  
  18.         // Change the current page
  19.         pagedRect.SetCurrentPage(4);
  20.  
  21.         Debug.Log("The current page number is " + pagedRect.CurrentPage);        
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement