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) { _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 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); } }); }); }