From c19b34542e3e0655ad84071bb479ba7791e1c55d Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 8 Jan 2025 15:00:54 +0800 Subject: [PATCH] [fix] fixed the bug where StripAOTDllCommand did not set BuildPlayerOptions.subtarget in Unity 2021+ versions, causing failure when publishing dedicated buildTarget. --- Editor/Commands/StripAOTDllCommand.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Editor/Commands/StripAOTDllCommand.cs b/Editor/Commands/StripAOTDllCommand.cs index 46672eb..eae6421 100644 --- a/Editor/Commands/StripAOTDllCommand.cs +++ b/Editor/Commands/StripAOTDllCommand.cs @@ -139,6 +139,9 @@ namespace HybridCLR.Editor.Commands options = buildOptions, target = target, targetGroup = BuildPipeline.GetBuildTargetGroup(target), +#if UNITY_2021_1_OR_NEWER + subtarget = (int)EditorUserBuildSettings.standaloneBuildSubtarget, +#endif }; var report = BuildPipeline.BuildPlayer(buildPlayerOptions);