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