예제 #1
0
    //场景
    private static void ExportAssetCommonScene()
    {
        List <string> tabPaths     = ToolsConst.GetCommonSceneFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".unity");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        SetAssetBundleName(pathFiles, "scene");
    }
예제 #2
0
    //表格
    static void ExportAssetCommonConfig()
    {
        List <string> tabPaths     = ToolsConst.GetCommonConfigFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".bytes");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        SetAssetBundlesName(pathFiles, "config");
    }
예제 #3
0
    //通用特效
    static void ExportAssetCommonEffect()
    {
        List <string> tabPaths     = ToolsConst.GetCommonEffectFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".prefab");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        //给文件设置AssetBundleName
        SetAssetBundleName(pathFiles, "effect");
    }
예제 #4
0
    //通用动画
    static void ExportAssetCommonAnimation()
    {
        List <string> tabPaths     = ToolsConst.GetCommonAnimationFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".anim");
        includeNames.Add(".controller");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        //给文件设置AssetBundleName
        SetAssetBundlesName(pathFiles, "anim");
    }
예제 #5
0
    //字体
    static void ExportAssetCommonFont()
    {
        List <string> tabPaths     = ToolsConst.GetCommonFontFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".ttf");
        includeNames.Add(".TTF");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        //给文件设置AssetBundleName
        SetAssetBundlesName(pathFiles, "fonts");
    }
예제 #6
0
    //各个角色
    static void ExportAssetCommonRole()
    {
        List <string> tabPaths     = ToolsConst.GetCommonUIRolePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>(); //拓展名

        includeNames.Add(".prefab");

        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }

        SetAssetBundleName(pathFiles, "role");
    }
예제 #7
0
    //通用的UI
    static void ExportAssetCommonUI()
    {
        List <string> tabPaths     = ToolsConst.GetCommonUIFilePath(); //目标AB路径
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>(); //拓展名

        includeNames.Add(".prefab");

        //把该路径下的所有.prefab 路径找出来放入 pathFiles
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }

        ActivePrefab(pathFiles, "ui");
    }
예제 #8
0
    //声音
    static void ExportAssetCommonAudio()
    {
        List <string> tabPaths     = ToolsConst.GetCommonAudioFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".mp3");
        includeNames.Add(".wav");
        includeNames.Add(".ogg");
        includeNames.Add(".aiff");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        //给文件设置AssetBundleName
        SetAssetBundleName(pathFiles, "audio");
    }
예제 #9
0
    //图片
    static void ExportAssetCommonImage()
    {
        List <string> tabPaths     = ToolsConst.GetCommonImageFilePath();
        List <string> paths        = new List <string>();
        List <string> pathFiles    = new List <string>();
        List <string> includeNames = new List <string>();

        includeNames.Add(".png");
        includeNames.Add(".jpg");
        includeNames.Add(".bmp");
        includeNames.Add(".tga");
        foreach (var v in tabPaths)
        {
            Recursive(v, paths, pathFiles, includeNames);
        }
        //给文件设置AssetBundleName
        SetAssetBundlesName(pathFiles, "icon");
    }
예제 #10
0
 //通用的图片
 static void ExportAssetCommonImage()
 {
     /*
      * List<string> tabPaths = ToolsConst.GetCommonImageFilePath();
      * List<string> paths = new List<string>();
      * List<string> pathFiles = new List<string>();
      * List<string> includeNames = new List<string>(); //拓展名
      *
      * includeNames.Add(".png");
      * includeNames.Add(".jpg");
      * includeNames.Add(".bmp");
      * includeNames.Add(".tga");
      *
      * foreach (var v in tabPaths)
      * {
      *  Recursive(v, paths, pathFiles, includeNames);
      * }
      *
      * SetAssetBundlesName(pathFiles, "icon");
      */
     ExportAssetSprites(ToolsConst.GetCommonImageFilePath(), "common");
 }
예제 #11
0
 static void ExportAssetIcons()
 {
     ExportAssetSprites(ToolsConst.GetIconsFilePath(), "icons");
 }