public void Open(ResourceManagerArgs args) { _bytesPerSecond = args.bytesPerSecond; _bytesPerSecondIdle = args.bytesPerSecondIdle; _worker = new DownloadWorker(onDownloadJobDone, args.bufferSize, args.urls, System.Threading.ThreadPriority.BelowNormal); _idleWorker = new DownloadWorker(onDownloadJobDone, args.bufferSize, args.urls, System.Threading.ThreadPriority.Lowest); _localPathRoot = args.localPathRoot; _assetPathTransformer = args.assetPathTransformer; _password = args.password; _streamingAssets = new StreamingAssetsLoader(); _streamingAssets.LoadEmbeddedManifest(streamingAssets => { if (args.useBaseManifest) { Helpers.ReadSAManifest(_password, (manifest, fileEntry) => { SetManifest(manifest, fileEntry); }); } else { Helpers.GetManifest(_localPathRoot, _worker, args.manifestChecksum, args.manifestSize, args.manifestRSize, _password, args.manifestChunkSize, (manifest, fileEntry) => { SetManifest(manifest, fileEntry); }); } }); }
public void Open(ResourceManagerArgs args) { try { ResourceManager.GetListener().OnSetManifest(); } catch (Exception exception) { Debug.LogWarningFormat("OnSetManifest exception\n{0}", exception); } }
public BundleAssetProvider(ResourceManagerArgs args) { _bytesPerSecond = args.bytesPerSecond; _bytesPerSecondIdle = args.bytesPerSecondIdle; _worker = new DownloadWorker(onDownloadJobDone, args.bufferSize, args.urls, System.Threading.ThreadPriority.BelowNormal); _idleWorker = new DownloadWorker(onDownloadJobDone, args.bufferSize, args.urls, System.Threading.ThreadPriority.Lowest); _localPathRoot = args.localPathRoot; _assetPathTransformer = args.assetPathTransformer; }
public void Open(ResourceManagerArgs args) { _password = args.password; Helpers.GetManifest(_localPathRoot, _worker, args.manifestChecksum, args.manifestSize, args.manifestRSize, _password, (manifest, fileEntry) => { _streamingAssets = new StreamingAssetsLoader(); _streamingAssets.LoadEmbeddedManifest(streamingAssets => { SetManifest(manifest, fileEntry); ResourceManager.GetListener().OnSetManifest(); }); }); }
public static void Initialize(ResourceManagerArgs args) { _urls.Clear(); _urls.AddRange(args.urls); if (_listener == null) { _listener = new EmptyAssetProviderListener(); } JobScheduler.Initialize(); if (_assetProvider != null) { _assetProvider.Close(); } #if UNITY_EDITOR if (_analyzer == null) { if (!string.IsNullOrEmpty(args.listDataPath)) { var listData = UnityEditor.AssetDatabase.LoadMainAssetAtPath(NormalizedListPath(args.listDataPath)) as AssetListData; if (listData != null) { _analyzer = new Analyzer.DefaultAssetsAnalyzer(listData); } } } if (args.devMode) { _assetProvider = new AssetDatabaseAssetProvider(args.asyncSimMin, args.asyncSimMax); } else #endif { _assetProvider = new BundleAssetProvider(); } args.oninitialize?.Invoke(); _assetProvider.Open(args); if (args.oncomplete != null) { _assetProvider.completed += args.oncomplete; } }
public void Open(ResourceManagerArgs args) { _password = args.password; Helpers.GetManifest(_localPathRoot, _worker, args.manifestChecksum, args.manifestSize, args.manifestRSize, _password, (manifest, fileEntry) => { _streamingAssets = new StreamingAssetsLoader(); _streamingAssets.LoadEmbeddedManifest(streamingAssets => { SetManifest(manifest, fileEntry); try { ResourceManager.GetListener().OnSetManifest(); } catch (Exception exception) { Debug.LogWarningFormat("OnSetManifest exception\n{0}", exception); } }); }); }
public static void Initialize(ResourceManagerArgs args) { _listener = new EmptyAssetProviderListener(); UnityFS.JobScheduler.Initialize(); #if UNITY_EDITOR if (args.devMode) { _assetProvider = new UnityFS.AssetDatabaseAssetProvider(); } else #endif { _assetProvider = new UnityFS.BundleAssetProvider(args.localPathRoot, args.urls, args.concurrentTasks, args.slow, args.bufferSize, args.assetPathTransformer); } if (args.oninitialize != null) { args.oninitialize(); } _assetProvider.Open(); if (args.oncomplete != null) { _assetProvider.completed += args.oncomplete; } }
public void Open(ResourceManagerArgs args) { ResourceManager.GetListener().OnSetManifest(); }