Experiencing problems downloading AssetBundles using WebClient


  • Download speed while using WebClient is pretty slow.


  • WebClient, which uses WebRequest, is slow when downloading AssetBundles since the AssetBundles are made to be downloaded by the WWW class.


This is a potential workaround: Declare the WebClient's proxy to null (webClient.Proxy=null) since the Request is configured to auto detect proxies. If this is declared, it will avoid an initial delay. Also, there are three suggestions to speed up working with WebClient:

  • Increase DefaultConnectionLimit
  • If it needs a proxy (e.g don't use webClient.Proxy = null) and its                                              settings are known, just establish the settings manually by script (e.g  string                 proxyUrl = ""int proxyPort = 8080;)
  • Deactivate Expect100Continue

Another possible resolution is to use the WWW class. In Unity 5.2, if you use the WWW.LoadFromCacheOrDownload method,  the file will be saved uncompressed in small chunks to disk as it is being download. It will not all be loaded into memory when it is downloaded. In Unity 5.3 there is an option to store the file compressed in cache with the new support for LZ4 compression added to this release. 

More Information

For more information see the links below: 

This article applies to Unity versions 5.x


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.