diff --git a/pipelines/templates/tasks/build-unity.yaml b/pipelines/templates/tasks/build-unity.yaml index da26b7e08a7..7afbbd39ca0 100644 --- a/pipelines/templates/tasks/build-unity.yaml +++ b/pipelines/templates/tasks/build-unity.yaml @@ -28,14 +28,7 @@ parameters: default: '' steps: -- pwsh: | - # Module management requires TLS 1.2. - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - # UnitySetup 5.5.146-develop specifically added support for Unity 2021. - if (-not (Get-InstalledModule -Name UnitySetup -MinimumVersion "5.5.146-develop" -AllowPrerelease)) { - Install-Module UnitySetup -Scope CurrentUser -Force -AllowPrerelease - } - +- powershell: | $logFile = Join-Path $(Agent.TempDirectory) "build_${{ parameters.BuildTarget }}.log" $proc = Start-UnityEditor -Project ${{ parameters.PathToProject }} -Version ${{ parameters.UnityVersion }} -ExecuteMethod ${{ parameters.CommandLineBuildMethod }} -BatchMode -Quit -PassThru -LogFile $logFile -BuildTarget ${{ parameters.BuildTarget }} -OutputPath ${{ parameters.OutputPath }} -AdditionalArguments "-CacheServerIPAddress ${Env:COG-UnityCache-WUS2-01} ${{ parameters.AdditionalArguments }}" $ljob = Start-Job -ScriptBlock { param($log) Get-Content "$log" -Wait } -ArgumentList $logFile