void Start () { page = 0; maxPage = 0; instance = this; Generate (); foreach (string s in GameData.categoryLists.Keys) { categoryPage [maxPage+1] = s; maxPage += (int)(Mathf.CeilToInt(GameData.categoryLists[s].Count/20) + 1); } page = 0; updateButtons(); }
// Use this for initialization void Awake(){ instance = this; }