www.progress always 1 or 0

When downloading large files I need to see the progress however www.progress always seems to return 0 or 1. What is the correct way to get progress when downloading files in unity script?

I am starting the download as a coroutine.

while (!www.isDone) {
   var progress: float = www.progress * 100.0;
   print("Progress: " + progress);
   yield WaitForSeconds(0.1);
}

AFAIK this occurs only when testing in the editor. You should get the correct values in your application.

www.Progress returns 0.0 or 1.0, so you need to read the values in between 0.0 and 1.0.

So half done would be 0.5.

In the log it doesn’t show the numbers after the point for some reason.

The problem with www.progress comes from the file size. It works fine with small files (a few MB), but it stops working with large files (1GB, for example).

Apparently the devs know about this problem, but there is still no fix, and we should not expect one any time soon.

I suppose you are using www.LoadFromCacheOrDownload, if so then your download only downloads for the first time. Try using a different link.