Beispiel #1
0
 private void OnReceivedAssetBundleData(string responseText, string errorText, WWWHelper.TimeOut isTimeOut)
 {
     if (!string.IsNullOrEmpty(errorText) || isTimeOut == WWWHelper.TimeOut.YES)
     {
         this.www_err_bk = errorText;
     }
     else
     {
         try
         {
             AssetBundleInfoData item = JsonMapper.ToObject <AssetBundleInfoData>(responseText);
             this.abidList.Add(item);
         }
         catch (JsonException ex)
         {
             this.www_err_bk = ex.ToString();
         }
     }
 }
Beispiel #2
0
    private void OnReceivedAssetBundleInfo(string responseText, string errorText, WWWHelper.TimeOut isTimeOut)
    {
        bool flag = false;

        if (!string.IsNullOrEmpty(errorText) || isTimeOut == WWWHelper.TimeOut.YES)
        {
            flag = true;
        }
        else
        {
            try
            {
                AssetBundleFileInfoList assetBundleFileInfoList = JsonMapper.ToObject <AssetBundleFileInfoList>(responseText);
                AssetDataMng.assetVersion = assetBundleFileInfoList.version;
                for (int i = 0; i < assetBundleFileInfoList.assetBundleFileInfo.Count; i++)
                {
                    string name = assetBundleFileInfoList.assetBundleFileInfo[i].name;
                    this.abFolderList.Add(name);
                }
                base.StartCoroutine(this.LoadABData_FromWWW());
            }
            catch
            {
                flag = true;
            }
        }
        if (flag)
        {
            global::Debug.LogWarningFormat("ERROR : =========== AB_Init => {0} = {1}", new object[]
            {
                DataMng.Instance().RespDataCM_ABVersion.assetBundleVersionList[0].accessPath,
                errorText
            });
            this.OpenAlert(new Action(this.LoadABInfo_FromWWW));
        }
    }