@@ -192,6 +192,13 @@ jobs:
192192 - uses : actions/checkout@v3
193193 with :
194194 lfs : true
195+ - name : Cache Unity Library folder
196+ uses : actions/cache@v3
197+ with :
198+ path : sample-unity6/Library
199+ key : Library-Unity6-Windows-${{ hashFiles('sample-unity6/Assets/**', 'sample-unity6/Packages/**', 'sample-unity6/ProjectSettings/**') }}
200+ restore-keys : |
201+ Library-Unity6-Windows-
195202 - name : Setup symlinks for Unity 6 Windows
196203 run : .\setup-symlinks.ps1
197204 - name : Verify symlinks were created
@@ -240,10 +247,28 @@ jobs:
240247 Write-Output "Building Unity 6 Windows executable..."
241248 Write-Output "Note: First run will import packages then build. This may take 10-15 minutes."
242249 Write-Output ""
250+ Write-Output "Current directory: $(Get-Location)"
251+ Write-Output "Project path exists: $(Test-Path '${{ github.workspace }}\sample-unity6')"
252+ Write-Output "Assets folder exists: $(Test-Path '${{ github.workspace }}\sample-unity6\Assets')"
253+ Write-Output "Library folder exists: $(Test-Path '${{ github.workspace }}\sample-unity6\Library')"
254+ Write-Output ""
243255 Write-Output "Starting Unity build at: $(Get-Date -Format 'HH:mm:ss')"
244256
245- & "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe" -projectPath "${{ github.workspace }}\sample-unity6" -executeMethod "WindowsBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}\sample-unity6\build-log.log" -quit -batchmode -nographics --buildPath "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe"
246- $buildExitCode = $LASTEXITCODE
257+ # Run Unity and capture output in real-time
258+ $unityPath = "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe"
259+ $projectPath = "${{ github.workspace }}\sample-unity6"
260+ $logFile = "${{ github.workspace }}\sample-unity6\build-log.log"
261+ $buildPath = "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe"
262+
263+ $process = Start-Process -FilePath $unityPath `
264+ -ArgumentList "-projectPath", $projectPath, `
265+ "-executeMethod", "WindowsBuilderUnity6.BuildForAltTester", `
266+ "-logFile", $logFile, `
267+ "-quit", "-batchmode", "-nographics", `
268+ "--buildPath", $buildPath `
269+ -Wait -PassThru -NoNewWindow
270+
271+ $buildExitCode = $process.ExitCode
247272
248273 Write-Output ""
249274 Write-Output "Unity build finished at: $(Get-Date -Format 'HH:mm:ss')"
0 commit comments