$ErrorActionPreference = 'Stop' $root = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../..')) $project = Join-Path $root 'Assets/Modules/ShrinkShared.CodeGen/DotNet~/ShrinkSDK.CodeGen.Analyzers' $output = Join-Path $root 'Artifacts/AgentSupport/unity-analyzer' & dotnet build $project -c Release -p:RoslynVersion=3.8.0 "-p:OutputPath=$output/" --nologo /nodeReuse:false if ($LASTEXITCODE -ne 0) { throw 'Unity analyzer build failed.' } Copy-Item -LiteralPath (Join-Path $output 'ShrinkSDK.CodeGen.Analyzers.dll') -Destination (Join-Path $root 'Assets/Modules/ShrinkShared.CodeGen/Analyzers/ShrinkSDK.CodeGen.Analyzers.dll') # Keep the Unity-generated .meta: RoslynAnalyzer label and disabled runtime plugin platforms.