Hey guys,
I’ve got a script that gets a value from the given URL and displays it. It works fine in Editor and Runtime so far, but my problem is that I have to build it as Windows Universal App (Windows Store App).
When I debug the build in Visual Studio, it starts properly and loads the data from the server. After five seconds it restarts the scene and should download it again to check if the value has changed. And there’s the problem.
After the first download it doesn’t work anymore. It’s refreshing every 5 seconds but when I change the value on the server it doesn’t appear on the screen. It can’t be a server problem because it’s working for all other platforms, so there’s propably something wrong with the Universal App. I don’t know if it’s just a problem showing the text. “Internet(Client)” capability is enabled.
void Start ()
{
text = GameObject.Find("Text").GetComponent<Text>();
StartCoroutine("Download");
}
IEnumerator Download()
{
//Get the value from the server
download = new WWW (webURL + publicCode + "/pipe/" + attribute);
yield return download;
//Write it in the UI element
text.text = download.text;
//Wait
yield return new WaitForSeconds(5);
//Reload
SceneManager.LoadScene(0);
}
}
Thanks in advance
Jan