// Use this for initialization void Start() { ss = GameObject.FindWithTag("input").GetComponent <server_part>(); inputstring = ss.getinput(); ConnectToTcpServer(); client = GameObject.FindWithTag("client"); server = GameObject.FindWithTag("server"); messeage = GameObject.FindWithTag("server").GetComponent <Text>(); text_send = " Send coordinates of particles successfully!"; text_receive = " Received the image successfully!"; }
// Use this for initialization void Start() { // Start TcpServer background thread ss = GameObject.FindWithTag("input").GetComponent <server_part>(); inputstring = ss.getinput(); //saveasimage(); tcpListenerThread = new Thread(new ThreadStart(ListenForIncommingRequests)); tcpListenerThread.IsBackground = true; tcpListenerThread.Start(); server = GameObject.FindWithTag("server"); messeage = GameObject.FindWithTag("server").GetComponent <Text>(); text_send = " Send coordinates of particles successfully!"; text_receive = " Received the image successfully!"; }