Example #1
0
 /// <summary>
 /// 发送UDP指令
 /// </summary>
 /// <param name="msg"></param>
 private void SendData(UDPMSG msg)
 {
     udpSocket.SendData(msg.IP, Encoding.Default.GetBytes(msg.DataString), (ushort)msg.Port);
     Debug.Log(msg.IP + " " + msg.Port + " " + msg.DataString);
 }
Example #2
0
 public void SendToPython()
 {
     udpSocket.SendData("Sent From Unity: " + numToSendToPython.ToString());
     numToSendToPython++;
     sendToPythonText.text = "Send Number: " + numToSendToPython.ToString();
 }