public IEnumerator get_records(System.Action <bool> callback) { bool isSuccessful = false; WWWForm wwwForm = new WWWForm(); wwwForm.AddField("Id", 0); WWW www = new WWW(server + path + "get_records.php", wwwForm); yield return(www); Debug.LogError(www.text.Trim()); if (www.error == null) { isSuccessful = true; records = records.DeserializeObject(www.text.Trim()); } else { Debug.LogError(www.error); } callback(isSuccessful); }