Skip to content

Commit 9071cec

Browse files
committed
Added PassThru flag to optionally report started process
1 parent dbd77a7 commit 9071cec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ function Select-UnitySetupInstance
225225
Should the Unity Editor quit after it's done?
226226
.PARAMETER Wait
227227
Should the command wait for the Unity Editor to exit?
228+
.PARAMETER PassThru
229+
Should the command return the process object? Default is nothing.
228230
.EXAMPLE
229231
Start-UnityEditor
230232
.EXAMPLE
@@ -251,7 +253,9 @@ function Start-UnityEditor
251253
[parameter(Mandatory = $false)]
252254
[switch] $Quit,
253255
[parameter(Mandatory = $false)]
254-
[switch] $Wait
256+
[switch] $Wait,
257+
[parameter(Mandatory = $false)]
258+
[switch] $PassThru
255259
)
256260

257261
if( $Instance -eq $null )
@@ -330,4 +334,6 @@ function Start-UnityEditor
330334
throw "Unity quit with non-zero exit code"
331335
}
332336
}
337+
338+
if( $PassThru ) { $process }
333339
}

0 commit comments

Comments
 (0)