|
|
|
@ -13,7 +13,7 @@ public class UDPPrinter : MonoBehaviour
@@ -13,7 +13,7 @@ public class UDPPrinter : MonoBehaviour
|
|
|
|
|
// Start is called before the first frame update |
|
|
|
|
void Start() |
|
|
|
|
{ |
|
|
|
|
udpUtil = new UDPUtility("127.0.0.1", 20000); |
|
|
|
|
udpUtil = new UDPUtility("192.168.1.41", 20000); |
|
|
|
|
udpUtil.sendData("hello everyone!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -22,9 +22,6 @@ public class UDPPrinter : MonoBehaviour
@@ -22,9 +22,6 @@ public class UDPPrinter : MonoBehaviour
|
|
|
|
|
{ |
|
|
|
|
if (udpUtil != null && !"".Equals(udpUtil.getReceivedValue())) |
|
|
|
|
{ |
|
|
|
|
/*GameObject item = Instantiate(tcpMsgItem, tcpMsgContent); |
|
|
|
|
item.GetComponentInChildren<Text>().text = tcpUtil.receivedData.Value; |
|
|
|
|
this.GetModel<TCPEventModel>().onDataRecived.Invoke(tcpUtil.receivedData.Value);*/ |
|
|
|
|
Debug.Log(udpUtil.receivedData.Value); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|