Cache unity process handle
parent
458ca489c0
commit
66b7f8c362
|
@ -161,6 +161,9 @@ $unityProcess = Start-Process -FilePath "$Env:UNITY_PATH\Editor\Unity.exe" `
|
||||||
-PassThru `
|
-PassThru `
|
||||||
-NoNewWindow
|
-NoNewWindow
|
||||||
|
|
||||||
|
# Cache the handle so exit code works properly
|
||||||
|
$unityHandle = $unityProcess.Handle
|
||||||
|
|
||||||
while ($true) {
|
while ($true) {
|
||||||
if ($unityProcess.HasExited) {
|
if ($unityProcess.HasExited) {
|
||||||
Start-Sleep -Seconds 5
|
Start-Sleep -Seconds 5
|
||||||
|
|
Loading…
Reference in New Issue