Recently I have converted my Unity 2019.1.0 project into Unity 2019.2.9 and it is a WebGL project. In the project I am using asset bundle and here is the snippet to load the bundle:
IEnumerator DependancyAssetBundleLoader()
{
www = UnityWebRequestAssetBundle.GetAssetBundle(bundleURLForDependency);
// www.chunkedTransfer = false;
yield return www.SendWebRequest();
AssetBundle bundleDependancy = ((DownloadHandlerAssetBundle)www.downloadHandler).assetBundle;
if (www.error != null)
{
//Debug.LogError("assetBundleURL : " + bundleURLForDependency);
Debug.LogError("response code : " + www.responseCode);
Debug.LogError("www error : " + www.error);
www.Dispose();
www = null;
yield break;
}
}
I don't know what went wrong with the asset bundle loading and now I am getting this error:
Received no data in response
I logged the response code and it is 0.