Question by
mrgeorge3d · Jun 16, 2020 at 08:15 PM ·
unity 5request
UnityWebRequest downloadProgress is always 0
Hi, I'm new to WebRequests and I want to get the download progress from an asset bundle. My asset is downloaded successfully, however the progress always shows 0. Could you point me how to get the download progress correctly?
Thanks.
My code is:
IEnumerator GetAssetBundle()
{
using (UnityWebRequest www = UnityWebRequestAssetBundle.GetAssetBundle(mUri, 0, 0))
{
www.SendWebRequest();
while (!www.isDone)
{
Debug.Log(www.downloadProgress);
yield return null;
}
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
}
else
{
Bundle = DownloadHandlerAssetBundle.GetContent(www);
Debug.Log("Success");
}
}
}
Comment
Your answer

Follow this Question
Related Questions
Unity WebGL build and PHP Post communication 0 Answers
Player should be able to go through Wall 3 Answers
Images are not displayed 0 Answers
I can see 3D text thru objects 0 Answers