예제 #1
0
        void GenerateCLRBindingScripts()
        {
            EditorUtility.DisplayProgressBar("生成绑定代码", "清空旧的绑定代码", 0f);
            FileUtil.DeleteFileOrDirectory(GENERATED_OUTPUT_DIR);
            EditorUtility.DisplayProgressBar("生成绑定代码", "构建新的scripts.dll", 0.5f);
            var cmd = new DllBuildCommand(ZeroEditorConst.HOT_SCRIPT_ROOT_DIR, ZeroEditorConst.DLL_PUBLISH_DIR);

            cmd.onFinished += OnDllBuildFinished;
            cmd.Execute();
        }
예제 #2
0
        /// <summary>
        /// 构建热更DLL文件
        /// </summary>
        void BuildDll(Action onBuildSuccess, Action onBuildFail)
        {
            var cmd = new DllBuildCommand(ZeroEditorConst.HOT_SCRIPT_ROOT_DIR, ZeroEditorConst.DLL_PUBLISH_DIR);

            cmd.onFinished += (DllBuildCommand self, bool isSuccess) => {
                if (isSuccess)
                {
                    //继续打包
                    onBuildSuccess?.Invoke();
                }
                else
                {
                    onBuildFail?.Invoke();
                }
            };
            cmd.Execute();
        }