void OnGUI() { // if connection has not been made, display button to connect if (GUI.Button(new Rect(10, 10, 100, 100), "send test message")) { C_Test test = new C_Test(CLIENT_NAME.CN_UNITY_1, DATA_NAME.DN_TEST, DATA_TYPE.DT_POINT3); test.value[0] = 1.1; test.value[1] = 2.1; test.value[2] = 3.1; /* C_Test test = new C_Test(CLIENT_NAME.CN_UNITY_1, (int)DATA_TYPE.DT_ARDUINO, 1);*/ myTCP.SendToServer(test.ToByteArray()); } }