void initalCategories() { Cate[] cateList = ReadHandler.readCategories(); for (int i = 0; i < 9; i++) { CategoryButton cateBtn = categoryContainer.transform.GetChild(i).GetComponent <CategoryButton>(); Cate cate = cateList[i]; Song[] songList = ReadHandler.readSongs(cate.ID); cateBtn.initial(cate.ID, cate.name, songList); } }
public void readCates() { Cate[] cateList = ReadHandler.readCategories(); for (int i = 0; i < 9; i++) { CategoryManager cateMng = categoryContainer.transform.GetChild(i).GetComponent <CategoryManager>(); Cate cate = cateList[i]; cateMng.setID(cate.ID); cateMng.setName(cate.name); cateMng.setToggle(cate.enabled); } }