private IEnumerator ReadQuestions(string name, int id) { yield return(new WaitForEndOfFrame()); WWWForm form = new WWWForm(); form.AddField("poll", id.ToString()); var download = UnityWebRequest.Post(questionsURL, form); yield return(download.SendWebRequest()); if (download.isNetworkError || download.isHttpError) { Debug.Log("Error downloading: " + download.error); } else { string[] result = download.downloadHandler.text.Split("|"[0]); poll = new PollData(); for (int i = 0; i < result.Length - 1; i++) { string[] x = result[i].Split(","[0]); poll.AddQuestion(x[0], Convert.ToInt32(x[1])); } StartCoroutine(ReadOptions(id)); } yield break; }