private IEnumerator UpdateManifestInternal() { var sw = System.Diagnostics.Stopwatch.StartNew(); // アセット管理情報読み込み. var manifestAssetInfo = AssetInfoManifest.GetManifestAssetInfo(); var assetPath = PathUtility.Combine(resourceDirectory, manifestAssetInfo.ResourcePath); // AssetInfoManifestは常に最新に保たなくてはいけない為必ずダウンロードする. var loadYield = assetBundleManager.UpdateAssetInfoManifest() .SelectMany(_ => assetBundleManager.LoadAsset <AssetInfoManifest>(manifestAssetInfo, assetPath)) .ToYieldInstruction(false); while (!loadYield.IsDone) { yield return(null); } if (loadYield.HasError || loadYield.IsCanceled) { yield break; } SetAssetInfoManifest(loadYield.Result); sw.Stop(); if (LogEnable && UnityConsole.Enable) { var message = string.Format("UpdateManifest: ({0:F2}ms)", sw.Elapsed.TotalMilliseconds); UnityConsole.Event(ConsoleEventName, ConsoleEventColor, message); } // アセット管理情報を登録. assetBundleManager.SetManifest(assetInfoManifest); #if ENABLE_CRIWARE_ADX || ENABLE_CRIWARE_SOFDEC criAssetManager.SetManifest(assetInfoManifest); #endif // 不要になったファイル削除. var deleteCacheYield = DeleteDisUsedCache().ToYieldInstruction(false); while (!deleteCacheYield.IsDone) { yield return(null); } if (deleteCacheYield.HasError) { Debug.LogException(deleteCacheYield.Error); } }
private IEnumerator UpdateManifestInternal(IProgress <float> progress = null) { var sw = System.Diagnostics.Stopwatch.StartNew(); // アセット管理情報読み込み. var manifestFileName = AssetInfoManifest.ManifestFileName; #if UNITY_EDITOR if (simulateMode) { manifestFileName = PathUtility.Combine(resourceDir, manifestFileName); } #endif var manifestAssetInfo = AssetInfoManifest.GetManifestAssetInfo(); // AssetInfoManifestは常に最新に保たなくてはいけない為必ずダウンロードする. var loadYield = assetBundleManager.UpdateAssetInfoManifest() .SelectMany(_ => assetBundleManager.LoadAsset <AssetInfoManifest>(manifestAssetInfo, manifestFileName)) .ToYieldInstruction(false); yield return(loadYield); if (loadYield.HasError || loadYield.IsCanceled) { yield break; } SetAssetInfoManifest(loadYield.Result); sw.Stop(); var message = string.Format("UpdateManifest: ({0}ms)", sw.Elapsed.TotalMilliseconds); UnityConsole.Event(ConsoleEventName, ConsoleEventColor, message); // アセット管理情報を登録. assetBundleManager.SetManifest(assetInfoManifest); #if ENABLE_CRIWARE_ADX || ENABLE_CRIWARE_SOFDEC criAssetManager.SetManifest(assetInfoManifest); #endif }