From 940a9e716052fc67c129f03b5b3a83e6a64ccc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E3=80=91=E7=A8=8B=E4=B8=80?= =?UTF-8?q?=E5=B3=B0?= <649669121@qq.com> Date: Tue, 14 Feb 2023 20:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Refactor=E3=80=91=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E4=BB=A3=E7=A0=81=E7=9A=84=E5=AE=8F=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UpmGitTool/Assets/Scritps/Core/AppRunner.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/UpmGitTool/Assets/Scritps/Core/AppRunner.cs b/UpmGitTool/Assets/Scritps/Core/AppRunner.cs index 5b7343b..e73c61f 100644 --- a/UpmGitTool/Assets/Scritps/Core/AppRunner.cs +++ b/UpmGitTool/Assets/Scritps/Core/AppRunner.cs @@ -31,14 +31,20 @@ namespace UpmGitTool Application.targetFrameRate = 30; AppState.Setting = Setting; + +#if UNITY_EDITOR AppState.Path_FetchJsCmd = FetchPackagePath; - AppState.Path_WorkingDirectory = WorkingDirectory; AppState.Path_NodeJsExe = NodeJsPath; + AppState.Path_WorkingDirectory = WorkingDirectory; +#endif + GYEventsCenter.RegisterEventMsg(Lib.ON_ADD_GIT_FETCH_REQ, OnAddGitFetchReq); StartCoroutine(AutoReadFeatchResult()); } +#if UNITY_EDITOR + [LabelText("Node.exe路径")] [FilePath] public string NodeJsPath; @@ -52,14 +58,14 @@ namespace UpmGitTool public string WorkingDirectory; [Title("编辑器测试")] - [LabelText("测试工程")] + [LabelText("测试工程")] [FolderPath(AbsolutePath = true)] [PropertyOrder(15)] public string TestProjectPath; [PropertyOrder(15)] [LabelText("测试工程路径")] - [ShowInInspector,DisplayAsString] + [ShowInInspector, DisplayAsString] public string Path_ManifestFile => AppState.Path_ManifestFile; [Button("读取测试工程")] @@ -78,6 +84,8 @@ namespace UpmGitTool CoreFunction.SaveManifest(); } +#endif + private IEnumerator AutoReadFeatchResult() { string resultDir = $"{AppState.Path_WorkingDirectory}/Results-2.0.0"; -- GitLab