public static WWWProgress PreDownloadRequest(IEnumerable <string> urls, PostProcPerList callback, object param)
        {
            if (!NrTSingleton <NrGlobalReference> .Instance.useCache)
            {
                WWWProgress wWWProgress = new WWWProgress(1f);
                wWWProgress.AddCompletionCnt();
                return(wWWProgress);
            }
            List <WWWItem> wiList = new List <WWWItem>();

            foreach (string current in urls)
            {
                Helper._PreDownloadRequest(current, ref wiList, false, param);
            }
            return(TsImmortal.bundleService.RequestDownloadCoroutine(wiList, DownGroup.BGLOAD, true, callback, param));
        }
Beispiel #2
0
 private IEnumerator _DownloadPerList(List <WWWItem> wiList, bool unloadAfterPostProcess, PostProcPerList cbDownloadPostProcPerList, object cbTargetGroupGO)
 {
     TsBundleService.< _DownloadPerList > c__Iterator21 <_DownloadPerList> c__Iterator = new TsBundleService.< _DownloadPerList > c__Iterator21();
Beispiel #3
0
    public WWWProgress RequestDownloadCoroutine(List <WWWItem> wiList, DownGroup dnGroup, bool unloadAfterPostProcess, PostProcPerList cbDownloadPostProcPerList, object cbTargetGroupGO)
    {
        StringBuilder stringBuilder = null;

        if (Option.EnableTrace)
        {
            stringBuilder = new StringBuilder(1024);
            foreach (WWWItem current in wiList)
            {
                current.DebugUnloadReserved = unloadAfterPostProcess;
                stringBuilder.AppendFormat("   \"{0}\"\r\n", current.assetPath);
                if (Option.EnableReportCallStatck)
                {
                    current.RequestCallStack = StackTraceUtility.ExtractStackTrace();
                }
            }
            TsLog.Log("[TsBundle] RequestDownloadCoroutine( Unload={0} ) Requests={1}\r\n{2}", new object[]
            {
                unloadAfterPostProcess,
                wiList.Count,
                stringBuilder.ToString()
            });
        }
        WWWProgress wWWProgress = new WWWProgress(wiList);

        if (wiList == null || 0 >= wiList.Count)
        {
            TsLog.LogWarning("Download List is empty!", new object[0]);
            cbDownloadPostProcPerList(wiList, cbTargetGroupGO);
        }
        else
        {
            this._AddRequestList(wiList, dnGroup, wWWProgress);
            base.StartCoroutine(this._DownloadPerList(wiList, unloadAfterPostProcess, cbDownloadPostProcPerList, cbTargetGroupGO));
        }
        return(wWWProgress);
    }