From c09dad4ae1b6257dfdd8eb136ebc6bf97644b651 Mon Sep 17 00:00:00 2001 From: walon Date: Mon, 29 May 2023 14:17:22 +0800 Subject: [PATCH] =?UTF-8?q?[remove]=20CheckSettings=E4=B8=AD=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E8=87=AA=E5=8A=A8=E8=AE=BE=E7=BD=AEApi=20Compatible?= =?UTF-8?q?=20Level?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/BuildProcessors/CheckSettings.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Editor/BuildProcessors/CheckSettings.cs b/Editor/BuildProcessors/CheckSettings.cs index bad1420..4a2f75a 100644 --- a/Editor/BuildProcessors/CheckSettings.cs +++ b/Editor/BuildProcessors/CheckSettings.cs @@ -54,20 +54,6 @@ namespace HybridCLR.Editor.BuildProcessors Debug.LogError($"[CheckSettings] 当前ScriptingBackend是:{curScriptingImplementation},已经自动切换为:{targetScriptingImplementation}"); PlayerSettings.SetScriptingBackend(buildTargetGroup, targetScriptingImplementation); } - ApiCompatibilityLevel curApiCompatibilityLevel = PlayerSettings.GetApiCompatibilityLevel(buildTargetGroup); -#if UNITY_2021_1_OR_NEWER - ApiCompatibilityLevel targetApiCompatibilityLevel = ApiCompatibilityLevel.NET_Unity_4_8; -#else - ApiCompatibilityLevel targetApiCompatibilityLevel = ApiCompatibilityLevel.NET_4_6; -#endif - - - if (curApiCompatibilityLevel != targetApiCompatibilityLevel) - { - Debug.LogError($"[CheckSettings] 当前ApiCompatibilityLevel是:{curApiCompatibilityLevel},已经自动切换为 {targetApiCompatibilityLevel}。由于下一次打包才生效,主动打断本次打包。"); - PlayerSettings.SetApiCompatibilityLevel(buildTargetGroup, ApiCompatibilityLevel.NET_4_6); - throw new BuildFailedException("ApiCompatibilityLevel error"); - } var installer = new Installer.InstallerController(); if (!installer.HasInstalledHybridCLR())