22 lines
498 B
PowerShell
22 lines
498 B
PowerShell
param(
|
|
[string]$ConfigPath = ".\ci\toolchain.json"
|
|
)
|
|
|
|
$config = Get-Content $ConfigPath | ConvertFrom-Json
|
|
|
|
$UnityVersion = $config.unityVersion
|
|
$UnityExe = Join-Path $config.unityRoot "$UnityVersion\Editor\Unity.exe"
|
|
|
|
Write-Host "Checking Unity $UnityVersion..."
|
|
|
|
if (!(Test-Path $UnityExe)) {
|
|
throw "Unity version not installed: $UnityVersion"
|
|
}
|
|
|
|
Write-Host "Unity found: $UnityExe"
|
|
|
|
# expose for later steps
|
|
$env:UNITY_VERSION = $UnityVersion
|
|
$env:UNITY_EXE = $UnityExe
|
|
|
|
return $UnityExe |