示例#1
0
 /// <summary>
 /// 获取BundleName带语言后缀名
 /// </summary>
 /// <param name="lang"></param>
 /// <returns></returns>
 public string GetBundleFileNameWithLangExtension(eAssetLanguageVarType lang)
 {
     if (hasOtherLanguage)
     {
         return(AssetI8NHelper.GetLangBundleStr(bundleFileName, lang) + BundleExtension);
     }
     else
     {
         return(bundleFileName + BundleExtension);
     }
 }
示例#2
0
 /// <summary>
 /// 获取BundleName带语言后缀名
 /// </summary>
 /// <param name="lang"></param>
 /// <returns></returns>
 public string GetBundleNameWithLangExtension(eAssetLanguageVarType lang)
 {
     if (hasOtherLanguage)
     {
         return(AssetI8NHelper.GetLangBundleStr(bundleNameMD5Struct.GetMD5Str(!isComplexName), lang));
     }
     else
     {
         return(bundleNameMD5Struct.GetMD5Str(!isComplexName));
     }
 }
示例#3
0
    public static string GetLangBundleVariantStr(eAssetLanguageVarType t)
    {
        switch (t)
        {
        case eAssetLanguageVarType.TW:
            return("tw");

        case eAssetLanguageVarType.KR:
            return("kr");

        case eAssetLanguageVarType.JP:
            return("jp");

        case eAssetLanguageVarType.EN:
            return("en");

        default:
            return("default");
        }
    }
示例#4
0
        /// <summary>
        /// 根据XMLtable表检查出需要下载的bundle
        /// </summary>
        /// <param name="table"></param>
        /// <returns></returns>
        public static List <string> GetBundleNeedDownLoadList(AssetBundleTable table, eAssetLanguageVarType lanType)
        {
            var list = new List <string>();

            if (table != null)
            {
                foreach (var x in table.BundleInfos)
                {
                    //检查Persist
                    var has = AssetBundlePathResolver.CheckBundleExistInPersisten(
                        x.GetBundleFileNameWithLangExtension(lanType));
                    //然后检查Stream
                    if (!has)
                    {
                        has = AssetBundlePathResolver.CheckBundleExistInStreaming(
                            x.GetBundleFileNameWithLangExtension(lanType));
                    }
                    if (!has)
                    {
                        list.Add(x.GetBundleFileNameWithLangExtension(lanType));
                    }
                }
            }

            return(list);
        }
示例#5
0
 public static string GetLangBundleStr(string bundleName, eAssetLanguageVarType t)
 {
     return(bundleName + "." + GetLangBundleVariantStr(t));
 }
示例#6
0
 /// <summary>
 /// 获取对应语言文件后缀名
 /// </summary>
 /// <param name="t"></param>
 /// <returns></returns>
 public static string GetLangFileExtensionStr(eAssetLanguageVarType t)
 {
     return(t == eAssetLanguageVarType.Default ? "" : "." + GetLangBundleVariantStr(t));
 }