I got an error message while downloading assetbundle file.
Like this: “Bad file length. URL: blahblah”
This is the download code.
WWW www = new WWW(url);
while (www.progress < 1.0f)
{
fileDownloadProgress = www.progress;
yield return null;
}
yield return www;
yield return null;
if (www.error != null)
{
Debug.LogError("ERROR while downloading " + keyName + ": " + www.error);
www.Dispose();
yield break;
}
But strange thing is that only few files show this error among approx. 600 files. These files are built with same assetbundle build setting and downloaded from same web server. Platform was Android and iPhone, both showed same error.
Could this happen from what cause? Assetbundle build error? or WWW download error? Corrupt resource file?
One thing is that after I built assetbundle with no compression it did not happen.
I attached two resource files and their .meta. These files are original resource files that causes error.
And their assetbundle file links are here which causes error while www downloading.
https://dl.dropboxusercontent.com/u/20968541/BadFileLength/Follower_V2_L.assetbundle (for android)
https://dl.dropboxusercontent.com/u/20968541/BadFileLength/Griffin_V1.assetbundle (for iphone)
Sorry for the inconvinence for different platform. Both two files cause error on both platforms.
1293961–59558–$Monster.7z (289 KB)