Fix build subtarget compatibility

Certain versions of Unity do not have a value for `NoSubtarget`. Using `default` will be more robust against churn in this area of Unity's API.
pull/532/head
danielchipman 2023-04-15 02:43:35 -07:00
parent 5f9f4994ce
commit bfc6ff3d92
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ namespace UnityBuilderAction
// Determine subtarget
StandaloneBuildSubtarget buildSubtarget;
if (!options.TryGetValue("standaloneBuildSubtarget", out var subtargetValue) || !Enum.TryParse(subtargetValue, out buildSubtarget)) {
buildSubtarget = StandaloneBuildSubtarget.NoSubtarget;
buildSubtarget = default;
}
#endif