From d02f3b3025c6a9496789152171a86a545b04180d Mon Sep 17 00:00:00 2001 From: liutao <821580467@qq.com> Date: Tue, 29 Apr 2025 17:54:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/ProjectBuilder/NoWindowFunctions.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ProjectNLD/Assets/Editor/ProjectBuilder/NoWindowFunctions.cs b/ProjectNLD/Assets/Editor/ProjectBuilder/NoWindowFunctions.cs index ef1fc20767e..c3c842f1dd9 100644 --- a/ProjectNLD/Assets/Editor/ProjectBuilder/NoWindowFunctions.cs +++ b/ProjectNLD/Assets/Editor/ProjectBuilder/NoWindowFunctions.cs @@ -9,9 +9,21 @@ namespace ProjectBuilder [MenuItem("Tools/文件与路径/转换为Dll")] public static void CovertToDll() { + if (Application.isPlaying) + { + Debug.LogError("不能在运行时转换为Dll"); + return; + } var dllPath = Application.dataPath + "/../Library/ScriptAssemblies/GamePlay.dll"; //Assets/Code/Scripts/Gameplay var codePath = Application.dataPath + "/Code/Scripts/Gameplay"; + var targetDllPath = codePath + "/GamePlay.dll"; + if (File.Exists(targetDllPath)) + { + // 说明已经转换过了 + Debug.LogError("已经转换过了"); + return; + } // 删除Code/Scripts/Gameplay下的所有文件 var directoryInfo = new System.IO.DirectoryInfo(codePath);