void AddItem(List <int> ptdata) { for (int i = 0; i < ptdata.Count; i++) { GameObject clone = GameObject.Instantiate(item) as GameObject; clone.SetActive(true); clone.transform.parent = grid.transform; clone.transform.position = Vector3.zero; clone.transform.localScale = Vector3.one; TitleCell tcell = clone.GetComponent <TitleCell>(); tcell.titleLabel.text = TitleData.GetTitleData(ptdata[i]).desc_; UIManager.SetButtonEventHandler(clone, EnumButtonEvent.OnClick, OnClickbtn, ptdata[i], 0); grid.repositionNow = true; } }
public void TitleCell(string data) { var summaryCell = new TitleCell(this.table, data, this.columnsCount); }