//reads in server output and does what the server says public void HandleServerOutput() { List <string> serverOutput = udpListen.ReadMessages(); //get the whole output in one string, from oldest to newest messages string fullOutput = ""; foreach (string s in serverOutput) { fullOutput += s; } //turn the string into a nice list of messages List <Message> messages = DataParserAndFormatter.GetMessagesFromServerOutput(fullOutput); //handle each message (oldest to newest) foreach (Message message in messages) { UnityHandler.HandleMessage(message); if (debug == true) { // Debug.Log("CLIENT: Sent message to Unity Handler"); } } }