Cache unity process handle

This commit is contained in:
Andrew Kahr 2023-11-14 17:44:41 -08:00
parent 458ca489c0
commit 66b7f8c362

View File

@ -161,6 +161,9 @@ $unityProcess = Start-Process -FilePath "$Env:UNITY_PATH\Editor\Unity.exe" `
-PassThru `
-NoNewWindow
# Cache the handle so exit code works properly
$unityHandle = $unityProcess.Handle
while ($true) {
if ($unityProcess.HasExited) {
Start-Sleep -Seconds 5