public static void BuildAllAB() { string strABOutPathDIR = string.Empty; //获取"SteamingAssets"数值 strABOutPathDIR = PathTool.GetABOutPath(); if (!Directory.Exists(strABOutPathDIR)) { Directory.CreateDirectory(strABOutPathDIR); } //打包生成 BuildPipeline.BuildAssetBundles(strABOutPathDIR, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64); }
public static void DelAssetBundle() { string strNeedDelDIR = string.Empty; strNeedDelDIR = PathTool.GetABOutPath(); if (!string.IsNullOrEmpty(strNeedDelDIR)) { //true : 删除非空目录 Directory.Delete(strNeedDelDIR, true); File.Delete(strNeedDelDIR + ".meta"); AssetDatabase.Refresh(); } }
public static void BuildAllAB() { //打包AB输出路径 string strABOutPathDIR = string.Empty; //获取"StreamingAssets"数值 //strABOutPathDIR = Application.streamingAssetsPath; strABOutPathDIR = PathTool.GetABOutPath(); //判断生成输出目录文件夹 if (!Directory.Exists(strABOutPathDIR)) { Directory.CreateDirectory(strABOutPathDIR); } //打包生成 BuildPipeline.BuildAssetBundles(strABOutPathDIR, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64); AssetDatabase.Refresh(); }