From 3566d135afa98493d57ebcfe8c20860b07dbf9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Tue, 14 Oct 2025 16:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/HybridCLR/BuildDLLCommand.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Editor/HybridCLR/BuildDLLCommand.cs b/Editor/HybridCLR/BuildDLLCommand.cs index 90f7fd6..5d53ab5 100644 --- a/Editor/HybridCLR/BuildDLLCommand.cs +++ b/Editor/HybridCLR/BuildDLLCommand.cs @@ -1,30 +1,20 @@ #if HYBIRDCLR_SUPPORT - -#if ENABLE_HYBRIDCLR using System; using System.Collections.Generic; using System.IO; using HybridCLR.Editor; using HybridCLR.Editor.Commands; -#endif - using System.Reflection; using AlicizaX; using AlicizaX.Editor; using UnityEditor; using UnityEngine; -[InitializeOnLoad] public static class BuildDLLCommand { private const string EnableHybridClrScriptingDefineSymbol = "ENABLE_HYBRIDCLR"; public static string AssemblyTextAssetPath = Application.dataPath + "/" + "Bundles/DLL"; - public static void SetCopyPath(string path) - { - AssemblyTextAssetPath = path; - } - /// /// 禁用HybridCLR宏定义。 /// @@ -46,7 +36,7 @@ public static class BuildDLLCommand HybridCLR.Editor.SettingsUtil.Enable = true; } -#if ENABLE_HYBRIDCLR &&HYBIRDCLR_SUPPORT + [MenuItem("HybridCLR/Tools/BuildAssets And CopyTo AssemblyTextAssetPath")] public static void BuildAndCopyDlls() { @@ -56,7 +46,7 @@ public static class BuildDLLCommand } - public static void GenerateHybridCLRSome() + public static void GenerateAll() { PrebuildCommand.GenerateAll(); } @@ -111,6 +101,7 @@ public static class BuildDLLCommand { return null; } + FileInfo info = new FileInfo(scriptPath); string scriptTypeName = info.Name.Replace(".cs", ""); @@ -149,6 +140,5 @@ public static class BuildDLLCommand Debug.Log($"[CopyHotUpdateAssembliesToStreamingAssets] copy hotfix dll {dllPath} -> {dllBytesPath}"); } } -#endif } #endif