public IEnumerator LoadAssetBundle()
{
state = DownloadState.Init;
downLoader = new WWW(path + fileName);
state = DownloadState.Loading;
yield return downLoader;
if(downLoader.error!=null)
{
state = DownloadState.LoadFailed;
downLoader.Dispose();
yield break;
}
else
{
size = downLoader.bytesDownloaded;
assetBundle = downLoader.assetBundle;
if(assetBundle==null)
{
state = DownloadState.LoadFailed;
}
else
{
state = DownloadState.Loaded;
}
downLoader.Dispose();
}
}