void BuildPart1() { if (_isBuildAB) { EditorUtility.DisplayProgressBar("打包热更资源", "开始发布AssetBundle", 0f); Debug.Log("开始发布AssetBundle"); //发布AB资源 _model.BuildAssetBundle(); } if (_isBuildDLL) { EditorUtility.DisplayProgressBar("打包热更资源", "正在发布DLL", 0f); Debug.Log("开始发布DLL"); _model.BuildDll(() => { Debug.Log("DLL发布成功"); BuildPart2(); }, () => { Debug.Log("DLL发布失败"); EditorUtility.ClearProgressBar(); }); } else { BuildPart2(); } }
void Build() { try { if (_isBuildDLL) { EditorUtility.DisplayProgressBar("打包热更资源", "开始发布DLL", 0f); Debug.Log("开始发布DLL"); _model.BuildDll(); } if (_isBuildAB) { EditorUtility.DisplayProgressBar("打包热更资源", "开始发布AssetBundle", 0f); Debug.Log("开始发布AssetBundle"); //发布AB资源 _model.BuildAssetBundle(); } if (_isBuildResJson) { EditorUtility.DisplayProgressBar("打包热更资源", "开始发布Res.json", 0f); Debug.Log("开始发布Res.json"); _model.BuildResJsonFile(); } //打开目录 ZeroEditorUtil.OpenDirectory(FileSystem.CombineDirs(false, _cfg.resDir, ZeroEditorUtil.PlatformDirName)); } catch (Exception e) { Log.E("{0}\n{1}", e.Message, e.StackTrace); ShowNotification(new GUIContent(e.Message)); } EditorUtility.ClearProgressBar(); }