This commit is contained in:
陈思海 2025-10-14 16:08:51 +08:00
parent 5369ced5eb
commit 3566d135af

View File

@ -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;
}
/// <summary>
/// 禁用HybridCLR宏定义。
/// </summary>
@ -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