//场景 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"); }
//表格 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"); }
//通用特效 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"); }
//通用动画 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"); }
//字体 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"); }
//各个角色 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"); }
//通用的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"); }
//声音 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"); }
//图片 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"); }
//通用的图片 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"); }
static void ExportAssetIcons() { ExportAssetSprites(ToolsConst.GetIconsFilePath(), "icons"); }