Hello.
I am having some trouble with WWW.progress. With small files (a few MB) there are no issues. Everything works as expected. But if the download file is large (1.01GB) then WWW.progress stays at 0.0 until the download finishes and then jumps to 1.0.
In this state I can’t show the download progress to the player. I have tried everything I can think of. I could really use some help.
Here is my code (JS):
var Progress : GUIText;
function Update ()
{
try
{
Progress.text = "Progress: " + www.progress * 100.0 + "%";
}
catch (err)
{}
}
function Download (link : String)
{
www = WWW(link);
yield www;
Debug.Log("Done");
}
EDIT:
One solution I thought of for this problem, would be to have a test file of exactly 1MB and check the time it takes to download, and from that estimate the download time of the large file. But this would be a very weird workaround, and I would prefer to find another solution.