Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

WWW.progress not working for large files

Discussion in 'Editor & General Support' started by FairGamesProductions, Nov 10, 2014.

  1. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    I am having a serious issue with the WWW module. I am using WWW to download a large ZIP file (1.01GB) containing updates to my game. While the download is going, I am attempting to use WWW.progress to display the download progress to the player, but WWW.progress stays at 0.0 until the download is completed and then changes to 1.0. I have been searching for a solution for days, and I could not find anything on the forums, and I really need some help.

    The strange thing is that on small files (a few MB) WWW.progress works. But I can't find any reference to the importance of file size to WWW.
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  3. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    Last edited: Nov 10, 2014
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    (Yes, I know)
     
  5. John Fallon

    John Fallon

    Unity Technologies

    Joined:
    Jul 1, 2014
    Posts:
    44
    Hey, this is a known issue that is currently being looked into by the QA team.
     
  6. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    Any estimate for a solution?
     
  7. John Fallon

    John Fallon

    Unity Technologies

    Joined:
    Jul 1, 2014
    Posts:
    44
    I'm afraid not but I will post here again if there is any further news.
     
  8. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    So... I shouldn't hold my breath. Good to know. Now I can move on.
     
  9. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Hi FairGames,

    The bug John just mentioned was the one I just dealt with: it turned out to not be a bug in Unity but rather a config problem with the server: the server was (for some reason) not sending the 'Content-Length' header, so Unity had no way of seeing how much of the file was left.

    What (in the case I just looked it) was complicating the issue is that the web server seemed to be only not sending that header for iOS and Android, not PC (no idea why that would be the case, but we verified it several times!) and so it made it appear like it was a bug with the WWW class on iOS and Android.

    Dave
     
  10. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    Dave, I don't think that's the issue here.
    I have 2 files. A test file and a large file. The test file is 1MB exactly and the large file is 1GB.
    WWW.progress works great with the small files, but it doesn't with the large ones. Both files are in the exact same place (google drive).
    Could this really be an issue with Google?
     
  11. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    Plus, this is on the PC, NOT Android or iOS...
     
  12. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    There's two directions you could go with this:

    1. If you have a repro case, you could submit it to us using the Bug Reporter.

    2. You could use something like a packet sniffer to try and intercept the data sent from the web server and see if the Content-Length header is there

    It's always possible that it's a completely different issue.
     
  13. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    I am working on web app , when i download an asset bundle(10 MB) the WWW.progress always stay 100%. Even my file was not downloaded it shows 100% right from the beginning.
    It works fine on editor but in web it WWW.progress is not working correctly.
    Any idea ?
     
  14. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    when it loading data from cache than it display the progress correctly.
     
  15. DeveshPandey

    DeveshPandey

    Joined:
    Sep 30, 2012
    Posts:
    221