[remove] CheckSettings中不再自动设置Api Compatible Level
parent
271dc70626
commit
c09dad4ae1
|
@ -54,20 +54,6 @@ namespace HybridCLR.Editor.BuildProcessors
|
||||||
Debug.LogError($"[CheckSettings] 当前ScriptingBackend是:{curScriptingImplementation},已经自动切换为:{targetScriptingImplementation}");
|
Debug.LogError($"[CheckSettings] 当前ScriptingBackend是:{curScriptingImplementation},已经自动切换为:{targetScriptingImplementation}");
|
||||||
PlayerSettings.SetScriptingBackend(buildTargetGroup, 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();
|
var installer = new Installer.InstallerController();
|
||||||
if (!installer.HasInstalledHybridCLR())
|
if (!installer.HasInstalledHybridCLR())
|
||||||
|
|
Loading…
Reference in New Issue