- Home /
Get Download Progress UnityWebRequest
Hello,
I am downloading images from my server, to give a proper feedback to the user i Zipped all the server images expecting to get the download handler to give me a 0% to 100% of the download, but the end up result is that
¿Every image gets download individually although being zipped?
here is the code:
using (UnityWebRequest www = UnityWebRequest.Get(serverUrl))
{
string authorization = Authenticate(ServerInfo.serverUser, ServerInfo.serverPass);
www.SetRequestHeader("AUTHORIZATION", authorization);
var operation = www.SendWebRequest();
while (!operation.isDone)
{
Debug.Log(Folder + " - " + www.downloadProgress * 100);
yield return new WaitForSeconds(1f);
}
Is this the expected behaviour when downloading a zip? (zip is uncompressed)
Is there a way of seeing the full % of the download? like current downloaded bytes vs total bytes or something like that.
Thanks.
Maybe it's because of this ?
Note: This property only works if the server’s response contains a Content-Length header (...)
Your answer
Follow this Question
Related Questions
www request ienumerator function doesn't work 0 Answers
WWW access Problem 2 Answers
When using yield and WWW-class the function wont run 1 Answer