///<初始化一个ITEM如果不够长往上加 void _MakedGridItem(int idx, COM_ChatInfo p) { //Transform tf = _Grid.GetChild(idx); Transform tf = cGrid.GetChild(idx); if (p.teamId_ != 0) { if (!IsTeamLevelChannel(p) && isShowTeamLevel) { if (tf == null) { return; } _Free(tf.gameObject); return; } } if (null == tf) { tf = _Alloc().transform; cGrid.AddChild(tf); //_Grid.AddChild(tf); tf.localPosition = Vector3.zero; tf.localScale = Vector3.one; } tf.gameObject.SetActive(true); ChatMinCell cmi = tf.GetComponentInChildren <ChatMinCell>(); cmi.Info = p; }
///<初始化一个ITEM如果不够长往上加 /// void _MakedGridItem(int idx, COM_ChatInfo p) { Transform tf = cGrid.GetChild(idx); if (null == tf) { tf = _Alloc().transform; if (null == tf) { } cGrid.AddChild(tf); tf.localPosition = Vector3.zero; tf.localScale = Vector3.one; } tf.gameObject.SetActive(true); ChatMaxCell cmi = tf.gameObject.GetComponent <ChatMaxCell>(); cmi.Info = p; }