public IEnumerator Initialize(BundleLoadingPresenter presenter, string cdnHost, NetResult result) { this.presenter = presenter; this.cdnHost = cdnHost; this.ready = false; Service.Run(UpdateProgress()); yield return(Service.Run(LoadScenes(result))); if (result.IsFailed()) { yield break; } yield return(Service.Run(LoadResources(result))); if (result.IsFailed()) { yield break; } result.SetSuccess(true); ready = true; yield break; }
IEnumerator LoadScenes(NetResult result) { yield return(Service.Run(DownloadSceneMeta(result))); if (result.IsFailed()) { logger.LogError("Can not load scene meta."); yield break; } #if UNITY_EDITOR && BOOT_BUNDLE_EDIT yield break; #endif // init count doneCount = 0; string text = Service.sb.Get("loading.status.bundle.load.scene"); if (presenter != null) { presenter.SetDescription(string.Format(text, 0)); } successSceneWorkerCount = 0; failedSceneWorkerCount = 0; for (int index = 0; index < worker; index++) { Service.Run(LoadSceneWorker(index)); } // waiting load while (true) { yield return(new WaitForSeconds(0.1f)); if (successSceneWorkerCount + failedSceneWorkerCount < worker) { continue; } break; } // result check if (failedSceneWorkerCount > 0) { result.SetSuccess(false); } else { result.SetSuccess(true); PersistenceUtil.SaveTextFile(remoteScenesMetaFilePath, remoteScenesMeta); } }
IEnumerator InitializeService() { Service.ready = false; yield return Service.sb.Initialize("en", "ko"); yield return Service.Run(Service.setting.Initialize()); // initialize bundle downloader service NetResult result = new NetResult(); yield return Service.Run(Service.bundle.Initialize(this, "http://raindays.net/unity/boot/", result)); if (result.IsFailed()) { logger.LogError(Service.sb.Get("loading.status.bundle.failed")); yield break; } Service.ready = true; }
IEnumerator InitializeService() { Service.ready = false; yield return(Service.sb.Initialize("en", "ko")); yield return(Service.Run(Service.setting.Initialize())); // initialize bundle downloader service NetResult result = new NetResult(); yield return(Service.Run(Service.bundle.Initialize(this, "http://raindays.net/unity/boot/", result))); if (result.IsFailed()) { logger.LogError(Service.sb.Get("loading.status.bundle.failed")); yield break; } Service.ready = true; }