/// <summary> /// Inits the row. /// </summary> private void InitRow() { Utility.DestroyAllChildren(_info.ScreenRoot.gameObject); //显示的函数列表..总共有TotalRowCount行显示信息... /* * _currBulletTextInfoList = new CombBulletTextInfo[_info.TotalRowCount]; * for (int rowIndex = 0; rowIndex < _info.TotalRowCount; rowIndex++) { * _currBulletTextInfoList[rowIndex] = null; * }*/ _currBulletTextElement = null; //节点名字....设置节点的父亲节点为_info的ScreenRoot节点... //only need one column string rowNodeName = string.Format("column_{0}", 0); GameObject newRow = new GameObject(rowNodeName); var rt = newRow.AddComponent <RectTransform>(); rt.SetParent(_info.ScreenRoot.transform, false); }