Skip to content

Commit 7cf05df

Browse files
committed
Added AcceptAPIUpdate parameter.
1 parent d3dae74 commit 7cf05df

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ function Get-UnityProjectInstance {
709709
The log file for the Unity Editor to write to.
710710
.PARAMETER BuildTarget
711711
The platform build target for the Unity Editor to start in.
712+
.PARAMETER AcceptAPIUpdate
713+
Accept the API Updater automatically. Implies BatchMode unless explicitly specified by the user.
712714
.PARAMETER BatchMode
713715
Should the Unity Editor start in batch mode?
714716
.PARAMETER Quit
@@ -765,6 +767,8 @@ function Start-UnityEditor {
765767
[ValidateSet('StandaloneOSX', 'StandaloneWindows', 'iOS', 'Android', 'StandaloneLinux', 'StandaloneWindows64', 'WebGL', 'WSAPlayer', 'StandaloneLinux64', 'StandaloneLinuxUniversal', 'Tizen', 'PSP2', 'PS4', 'XBoxOne', 'N3DS', 'WiiU', 'tvOS', 'Switch')]
766768
[string]$BuildTarget,
767769
[parameter(Mandatory = $false)]
770+
[switch]$AcceptAPIUpdate,
771+
[parameter(Mandatory = $false)]
768772
[switch]$BatchMode,
769773
[parameter(Mandatory = $false)]
770774
[switch]$Quit,
@@ -832,6 +836,11 @@ function Start-UnityEditor {
832836
}
833837

834838
$sharedArgs = @()
839+
if ( $AcceptAPIUpdate ) {
840+
$sharedArgs += '-accept-apiupdate'
841+
if( -not $PSBoundParameters.ContainsKey('BatchMode')) { $BatchMode = $true }
842+
}
843+
835844
if ( $CreateProject ) { $sharedArgs += "-createProject", $CreateProject }
836845
if ( $ExecuteMethod ) { $sharedArgs += "-executeMethod", $ExecuteMethod }
837846
if ( $OutputPath ) { $sharedArgs += "-buildOutput", $OutputPath }

0 commit comments

Comments
 (0)