void InitItem() { List <ItemData> dataList = ItemDataManager.Instance.dataList; for (int i = 0; i < dataList.Count; i++) { GameObject objBag = Instantiate(BagGrid); //objBag.SetActive(true); objBag.transform.parent = trContent; ItemBag item = objBag.GetComponent <ItemBag>(); item.SetID(dataList[i].ID); if (i == 0) { SetItemBag(item); } } }