private void RefreshSelectScroll() { var list = TechnologyManager.Instance.NeedTechnologyList; if (list != null && list.Count > 0) { SetSelectScroll(true); for (int i = 0; i < list.Count; i++) { var _tempCon = list[i]; if (i < m_btnItemList.Count) { m_btnItemList[i].gameObject.SetActive(true); m_btnItemList[i].Create(_tempCon); } else { var tempnewObj = Instantiate(Resources.Load <GameObject>(UIDef.uiTechnologyItem)); ObjectUtil.Attach(tempnewObj.transform, selectScroll.content); m_btnItemList.Add(tempnewObj.GetComponent <ItemTechnology>()); m_btnItemList[i].Create(_tempCon); } } } }