using UnityEngine; using UnityEngine.UI; using System.Collections; public class ChatItem : ItemRenderer { public Text titleTxt; public Text contentTxt; public Text timeTxt; public override object data { get { return base.data; } set { base.data = value; if(value != null) { ChatMsg chatMsg = value as ChatMsg; titleTxt.text = UserCache.GetNick (chatMsg.sender); contentTxt.text = chatMsg.content; timeTxt.text = chatMsg.GetTimeStr (); } } } }