void Awake() { GameObject obj = new GameObject("_WebDownload"); obj.transform.SetParent(transform); //使用 HttpWebRequest _webDownload = obj.AddComponent <HttpWeb>(); //使用 UnityWebRequest _webDownload = obj.AddComponent <UnityWeb>(); }
public void CheckUpdate(string module, bool isGetSize, Action <Md5File, long> complete) { _isGetSize = isGetSize; _complete = complete; new DownloadMd5File(module, DownloadMd5FileComplete); GameObject obj = new GameObject("_WebDownload"); obj.transform.SetParent(transform); _webDownload = obj.AddComponent <UnityWeb>(); }
public AppParser(IWebDownload download, JsonSerializerSettings serializerSettings, int truncateLimit, MatchOptions segmentMatchOptions, ProgramSettings settings) { this.download = download; this.serializerSettings = serializerSettings; this.truncateLimit = truncateLimit; this.segmentMatchOptions = segmentMatchOptions; this.settings = settings; // Debug下为了Fiddler的Auto Responder能稳定拦截请求,需要对id进行排序 if (settings.Debug) { this.output = new SortedSet<int>(); } else { this.output = new HashSet<int>(); } }
public DownloadObj SetWebDownload(IWebDownload webDownload) { this.webDownload = webDownload; return(this); }
private SGameUpdaterCallback m_downloadCallback; //下载资源回调函数Table #endregion #region 构造方法 public GameUpdater(SGameUpdaterCallback scallback) { m_downloadFailConfigList = new List <SGameUpdaterDownloadConfig>(); m_downloader = new GameObject("GameUpdater").AddComponent <UnityWeb>(); m_downloadCallback = scallback; }
/// <summary> /// Cancel a DownloadObject but do not remove from queue. /// </summary> public void Cancel(IWebDownload download) => download.Cancel();