diff --git a/Editor/Commands/StripAOTDllCommand.cs b/Editor/Commands/StripAOTDllCommand.cs index a6d99e4..0a66cfc 100644 --- a/Editor/Commands/StripAOTDllCommand.cs +++ b/Editor/Commands/StripAOTDllCommand.cs @@ -38,6 +38,9 @@ namespace HybridCLR.Editor.Commands BashUtil.RemoveDir(outputPath); var buildOptions = BuildOptions.BuildScriptsOnly; +#if UNITY_2021_1_OR_NEWER + buildOptions |= BuildOptions.CleanBuildCache; +#endif bool oldExportAndroidProj = EditorUserBuildSettings.exportAsGoogleAndroidProject; #if UNITY_EDITOR_OSX