/// <summary> /// 发送按钮 /// </summary> public void SendMessage() { if (sendmessageText.text != "") { string s = sendmessageText.text; //客户端显示名字+信息 string severS = this.name_Text.text + ":" + s; //发送给服务端 m_client.SendMessage(severS, MessageStatus.Message); //本地显示变色的用户名+信息 string clientS = s.Insert(0, "<color=blue>" + this.name_Text.text + "</color>:"); //显示在本地 messageText.text += clientS + "\n"; } }