Quantcast
Channel: Questions in topic: "assetbundles"
Viewing all articles
Browse latest Browse all 312

onDemandResources problems

$
0
0
Hello, I am facing some issues with ODR (On Demand Resource) in Unity. When I am downloading some resources using OnDemandResourcesRequest, I’m get errors to OnDemandResourcesRequest error field: «Connection invalidated to streaming unzip service.» and «无法与帮助程序通信。». Also, the first time app launch normally, and then I see these errors. What I’m doing wrong? Unity 2018.3.6f1 ---------- Request code: private IEnumerator LoadDemandBundle(string bundleName, LoadingProgress progress, Action callback = null) { SentrySdk.AddBreadcrumb(string.Format("Start loading demand bundle name: {0}", bundleName)); if (this.progress.IsContains(bundleName)) { yield break; } if (this.bundles.ContainsKey(bundleName)) { if (callback != null) { callback(this.bundles[bundleName]); yield break; } } OnDemandResourcesRequest onDemandResourcesRequest = OnDemandResources.PreloadAsync(new string[] { bundleName }); this.progress.Add(bundleName, onDemandResourcesRequest); yield return onDemandResourcesRequest; if (!string.IsNullOrEmpty(onDemandResourcesRequest.error)) { SentrySdk.CaptureMessage("ODR request failed " + bundleName + ": " + onDemandResourcesRequest.error); } AssetBundle bundle = AssetBundle.LoadFromFile("res://" + bundleName); if (bundle == null) { SentrySdk.CaptureMessage("Bundle restart downloading " + bundleName); progress.Remove(bundleName); this.LoadDemandBundle(bundleName, progress, callback).Execute(); yield break; } this.bundles.Add(bundleName, bundle); this.progress.setBundleReady(bundleName); if (callback != null) { callback(bundles[bundleName]); } }

Viewing all articles
Browse latest Browse all 312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>