[change] 禁用HybridCLR时不再复制裁剪后的AOT dll

[new] SettingsUtil.Enable 支持setter,允许代码中修改开启状态。
main
walon 2022-12-02 13:14:06 +08:00
parent abc70a7ffc
commit bc6e285b92
3 changed files with 15 additions and 2 deletions

View File

@ -57,6 +57,11 @@ namespace HybridCLR.Editor.BuildProcessors
public static void CopyStripDlls(string srcStripDllPath, BuildTarget target)
{
if (!SettingsUtil.Enable)
{
Debug.Log($"[CopyStrippedAOTAssemblies] disabled");
return;
}
Debug.Log($"[CopyStrippedAOTAssemblies] CopyScripDlls. src:{srcStripDllPath} target:{target}");
var dstPath = SettingsUtil.GetAssembliesPostIl2CppStripDir(target);

View File

@ -11,7 +11,15 @@ namespace HybridCLR.Editor
{
public static class SettingsUtil
{
public static bool Enable => HybridCLRSettings.Instance.enable;
public static bool Enable
{
get => HybridCLRSettings.Instance.enable;
set
{
HybridCLRSettings.Instance.enable = value;
HybridCLRSettings.Save();
}
}
public static string PackageName { get; } = "com.focus-creative-games.hybridclr_unity";

View File

@ -1,6 +1,6 @@
{
"name": "com.focus-creative-games.hybridclr_unity",
"version": "1.1.4",
"version": "1.1.5",
"displayName": "HybridCLR",
"description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR",
"category": "Runtime",