[fix] fixed the bug where StripAOTDllCommand did not set BuildPlayerOptions.subtarget in Unity 2021+ versions, causing failure when publishing dedicated buildTarget.

main
walon 2025-01-08 15:00:54 +08:00
parent e30306d7e1
commit c19b34542e
1 changed files with 3 additions and 0 deletions

View File

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