/// <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); }
public void SendToPython() { udpSocket.SendData("Sent From Unity: " + numToSendToPython.ToString()); numToSendToPython++; sendToPythonText.text = "Send Number: " + numToSendToPython.ToString(); }