Esempio n. 1
0
    //[MenuItem("Hugula/export language [Assets\\Lan]", false, 14)]
    public static void exportLanguage()
    {
        string assetPath = "Assets/Lan/";
        string path      = Application.dataPath + "/Lan/"; //AssetDatabase.GetAssetPath(obj).Replace("Assets","");

        List <string> files = getAllChildFiles(path, "csv");

        foreach (string name in files)
        {
            string abPath = assetPath + name.Replace(path, "");
            Debug.Log(abPath);
            Object txt     = AssetDatabase.LoadAssetAtPath(abPath, typeof(TextAsset));
            string cname   = txt.name;
            string outPath = ExportAssetBundles.GetOutPath();
            string tarName = outPath + "/Lan/" + cname + "." + Common.LANGUAGE_SUFFIX;
            CheckDirectory(Application.streamingAssetsPath + "/" + ExportAssetBundles.GetTarget().ToString() + "/Lan/");
            ExportAssetBundles.BuildAB(txt, null, tarName, BuildAssetBundleOptions.CompleteAssets);
        }
    }
Esempio n. 2
0
    public static void exportPublish()
    {
        ExportResources.DirectoryDelete(Path.Combine(Application.streamingAssetsPath, ExportAssetBundles.GetTarget().ToString()));

        BuildScript.BuildAssetBundles(); //导出资源

        exportLua();

        exportConfig();

        exportLanguage();

        autoVerAdd();
    }