Build subtarget support for Unity 2021.2+ (#532)

* Subtarget support for Unity 2021.2+

Allows passing the -standaloneBuildSubtarget parameter via customParameters in order to facilitate dedicated server builds. Since Unity introduced the subtarget option in 2021.2, this parameter only takes effect in supported Unity versions.

* 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.
This commit is contained in:
Daniel
2023-04-15 10:23:51 -07:00
committed by GitHub
parent 3032a4ab97
commit 857a41e877
2 changed files with 13 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ namespace UnityBuilderAction.Input
}
if (!Enum.IsDefined(typeof(BuildTarget), buildTarget)) {
Console.WriteLine($"{buildTarget} is not a defined {nameof(BuildTarget)}");
EditorApplication.Exit(121);
}