- Home /
WWW.progress not working for large files
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.
Well, I'm approaching my deadline on his, so if no-one answers by tomorrow morning, I guess I'll just have to go with the estimated approach, and include a way to update my Launcher when/if this EVER gets answered.
Answer by FairGamesProductions · Nov 09, 2014 at 11:22 AM
One solution is, for those having the same problem, to have a test file. Upload a file that is exactly 1MB in size to the same location as your large download. Check the download time of the test file, and from that you can estimate the download time of the large file.
It's not the best solution, but it's the best I have.
Your answer
Follow this Question
Related Questions
On Collide add progress help 1 Answer
Checkpoint with PlayerPrefs 0 Answers