private IEnumerator CoLoad(string url) { if (_loaderMode == LoaderMode.Sync) { Bytes = KResourceModule.LoadAssetsSync(url); } else { string _fullUrl; var getResPathType = KResourceModule.GetResourceFullPath(url, _loaderMode == LoaderMode.Async, out _fullUrl); if (getResPathType == KResourceModule.GetResourceFullPathType.Invalid) { Log.Error("[HotBytesLoader]Error Path: {0}", url); OnFinish(null); yield break; } _wwwLoader = KWWWLoader.Load(_fullUrl); while (!_wwwLoader.IsCompleted) { Progress = _wwwLoader.Progress; yield return(null); } if (!_wwwLoader.IsSuccess) { //if (AssetBundlerLoaderErrorEvent != null) //{ // AssetBundlerLoaderErrorEvent(this); //} Log.Error("[HotBytesLoader]Error Load WWW: {0}", url); OnFinish(null); yield break; } #if UNITY_2018_1_OR_NEWER //TODO 换成WebRequst //Bytes = _wwwLoader.Www.downloadHandler.data; Bytes = _wwwLoader.Www.bytes; #else Bytes = _wwwLoader.Www.bytes; #endif } OnFinish(Bytes); }