[fix] 修复 StripAOTDllCommand由于缓存原因,有些情况下生成失败的问题。通过添加BuildOptions.CleanBuildCache选项解决。此选项在Unity 2021及更高版本新增。

main
walon 2023-03-13 12:17:39 +08:00
parent 6909c32a0c
commit 3beb788baa
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ namespace HybridCLR.Editor.Commands
BashUtil.RemoveDir(outputPath); BashUtil.RemoveDir(outputPath);
var buildOptions = BuildOptions.BuildScriptsOnly; var buildOptions = BuildOptions.BuildScriptsOnly;
#if UNITY_2021_1_OR_NEWER
buildOptions |= BuildOptions.CleanBuildCache;
#endif
bool oldExportAndroidProj = EditorUserBuildSettings.exportAsGoogleAndroidProject; bool oldExportAndroidProj = EditorUserBuildSettings.exportAsGoogleAndroidProject;
#if UNITY_EDITOR_OSX #if UNITY_EDITOR_OSX