public void OnChatMessage(NetworkMessage netMsg)
    {
        MessageInfo info = netMsg.ReadMessage <MessageInfo>();

        if (isServer && !info.PassForServer)
        {
            info.PassForServer = true;
            //Send to all clients
            NetworkServer.SendToAll(MyMsgType.ChatMsg, info);
        }
        else if (client.isConnected)
        {
            string text = GetMessageFormat(info.text, info.sender);
            chatUI.AddNewLine(text);
        }
    }