public void SetDepartmentData(List <Department> depList) { for (int i = 0; i < depList.Count; i++) { GameObject Obj = InstantiateLine(); DepartmentItem item = Obj.GetComponent <DepartmentItem>(); item.ShowDepartmentItemInfo(depList[i], DepartList, grid, DepSelected.text, pegeNumText.text); if (i % 2 == 0) { item.GetComponent <Image>().sprite = DoubleImage; } else { item.GetComponent <Image>().sprite = OddImage; } } // ToggleAuthoritySet(); }