diff --git a/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs b/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs index 9c4c3db..3afb507 100644 --- a/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs +++ b/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs @@ -29,9 +29,8 @@ namespace HybridCLR.Editor [PostProcessBuild] public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject) { - if (target != BuildTarget.iOS) + if (target != BuildTarget.iOS || !HybridCLRSettings.Instance.enable) return; - /* * 1. 生成lump,并且添加到工程 3. 将libil2cpp目录复制到 Library/. 删除旧的. search paths里修改 libil2cpp/include为libil2cpp diff --git a/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2022OrNewer.cs b/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2022OrNewer.cs index 6e80096..e9987cd 100644 --- a/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2022OrNewer.cs +++ b/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2022OrNewer.cs @@ -21,7 +21,7 @@ namespace HybridCLR.Editor [PostProcessBuild] public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject) { - if (target != BuildTarget.iOS) + if (target != BuildTarget.iOS || !HybridCLRSettings.Instance.enable) return; string pbxprojFile = $"{pathToBuiltProject}/Unity-iPhone.xcodeproj/project.pbxproj";