I’m using WWW to Download file from server.
but WWW.progress is only return 0.
and i was try UnityWebRequest.
UnityWebRequest.downloadProgress is only return 0.5.
( UnityEditor was return correct value)
will WebGL build Support Progress?
Unity version 5.3.4f1
Tried this myself and WWW shows the progress correctly for me.
After downloaded once in the browser the file will be cached and loaded from there instantly.
If you can’t make it work on your end please file a bug report with repro project and ping the case number here.
thank you for your reply.
maybe i know why the WWW.progress always return 0.
When i download a “gzip” encoding file. ( set Content-Encoding use .htaccess )
it always return 0. ( UnityEditor is same behavior )
when download a non encoding file.
the progress is correctly!
sample:
http://kou-yeung.mygamesonline.org/
Left button for download “non encoding file” and Right button for download “gzip encoding file”
the progress will output to console.
thanks a lot.
FWIW, I see progress being output for both buttons in your sample in Firefox.
But: some http servers don’t set the full size for gzip compressed transfers in the headers, which makes it impossible for the browser to deduct the progress of the download. This is not a Unity issue - do you see the progress when you manually download the file in a browser?
ok, i got it. I tried manually download.
you are right! progress is correctly in Firefox.
In Chrome, on XMLHttpRequest progress event lengthComputable is false and total is 0.
so, this is not a Unity issue. I’m sorry about that.
thanks a lot.