public void SendData(string str) { if (udpPacketIO != null) { udpPacketIO.SendData(str); } else { Debug.LogWarning("udpPacketIO is null"); } }