Ситуация такая, url который требуется выводится в Debug.Log (http_response.show_url);
Как можно потом этот url отобразить в WebViev?
Вот Код:
using System.Collections;
using UnityEngine.Networking;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Json : MonoBehaviour {
private string domain = "example";
private string app_name = "test";
public void Start ()
{
StartCoroutine(GetHttpData());
}
IEnumerator GetHttpData()
{
UnityWebRequest www = UnityWebRequest.Get("http://" + domain + "/?app_n=" + app_name);
yield return www.Send();
if(www.isError) {
Debug.Log(www.error);
}
else {
string http_response_txt = www.downloadHandler.text;
CustomResponse http_response = JsonUtility.FromJson<CustomResponse>(http_response_txt);
Debug.Log(http_response_txt);
Debug.Log(http_response.url);
Debug.Log (http_response.show_url);
}
}