more
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
param(
|
param(
|
||||||
[Parameter(Mandatory = $true)]
|
|
||||||
[ValidateSet("Windows","Android")]
|
|
||||||
[string]$Target
|
[string]$Target
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -36,8 +34,7 @@ if (!(Test-Path $unityEditorPath)) {
|
|||||||
|
|
||||||
# Install Unity Editor
|
# Install Unity Editor
|
||||||
& $hubExe -- --headless install `
|
& $hubExe -- --headless install `
|
||||||
--version $unityVersion `
|
--version $unityVersion 2>$null
|
||||||
--changeset "" 2>$null
|
|
||||||
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
throw "Failed to install Unity $unityVersion"
|
throw "Failed to install Unity $unityVersion"
|
||||||
@@ -84,6 +81,10 @@ foreach ($module in $modules) {
|
|||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Resolve Unity build method
|
# Resolve Unity build method
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
if(!$Target){
|
||||||
|
Write-Host "No Target Provided"
|
||||||
|
exit
|
||||||
|
}
|
||||||
$method = switch ($Target) {
|
$method = switch ($Target) {
|
||||||
"Windows" { "BuildScript.Windows" }
|
"Windows" { "BuildScript.Windows" }
|
||||||
"Android" { "BuildScript.Android" }
|
"Android" { "BuildScript.Android" }
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"unityVersion": "2022.3.62f1",
|
"unityVersion": "6000.5.0f1",
|
||||||
|
|
||||||
"windows": {
|
"windows": {
|
||||||
"unityRoot": "C:\\Program Files\\Unity\\Hub\\Editor",
|
"unityRoot": "C:\\Program Files\\Unity\\Hub\\Editor",
|
||||||
|
|||||||
Reference in New Issue
Block a user