[remove] CheckSettings中不再自动设置Api Compatible Level

main
walon 2023-05-29 14:17:22 +08:00
parent 271dc70626
commit c09dad4ae1
1 changed files with 0 additions and 14 deletions

View File

@ -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())