Im trying to do a progress status thingy on the download from www stuff. But for some reason it the progress keeps beeing 0. I have included the test code which show the problem. It does seem to download as it turns 100 when complete. But the progress does not update other than jumping from 0 to 1. missing the 0.1 0.2 0.3 … etc. It is for standalone.
Am i doing something wrong?
using UnityEngine;
using System.Collections;
public class ProgressTester : MonoBehaviour {
public string url = "http://88.80.197.138/ContentApp-war/GetCE?csid=13";
private WWW www;
private IEnumerator download()
{
www = new WWW(url);
yield return www;
}
void OnGUI()
{
if(www == null)
{
}
else
{
if([url]www.error[/url] == null)
{
GUI.Label(new Rect(0, 0, 100, 100), new GUIContent("" + [url]www.progress[/url] * 100f + "%"));
}
else
{
GUI.Label(new Rect(0, 0, 100, 100), new GUIContent([url]www.error[/url]));
}
}
if(GUI.Button(new Rect(0, 100, 100, 100), new GUIContent("Start")))
{
StartCoroutine(download());
}
}
}
Edit: Simplifed the code, same problem.