We are having issues with Client+Server cooks missing Niagara GPU VFX.
Regarding our cooking process, I found out why -CookIncremental is broken in 5.6.1, you need to also add -zenstore so your cook overall looks like this:
(this is my local testing script, modify to your needs):
set P4_WORKSPACE=C:/MyP4Workspace
set UE_CONFIGURATION=-Win64-DebugGame
set UE_MODULE=MyModule
set UE_TARGET=MyGame
set CLIENT_CONFIG=Shipping
set UE_RUNUAT=%P4_WORKSPACE%/Engine/Build/BatchFiles/RunUAT.bat
set UE_UPROJECT=%P4_WORKSPACE%/%UE_MODULE%/%UE_MODULE%.uproject
set UE_CMD=%P4_WORKSPACE%\%UE_MODULE%\Binaries\Win64\%UE_TARGET%Editor%UE_CONFIGURATION%-Cmd.exe
set UE_ARCHIVE=%P4_WORKSPACE%/%UE_MODULE%/PackagedCook/%CLIENT_CONFIG%
:: Additional Cooker options
:: -noniagaraddc -CookIncremental -zenstore
set UE_COOKER=-additionalcookeroptions="-CookIncremental -zenstore"
:: No Additional Cooker options
::set UE_COOKER=
:: Client+Server
set TARGETS=%UE_TARGET%+%UE_TARGET%Server
:: Client Only
::set TARGETS=%UE_TARGET%
cmd.exe /c ""%UE_RUNUAT%" -ScriptsForProject="%UE_UPROJECT%" Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=59910 -project="%UE_UPROJECT%" BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project="%UE_UPROJECT%" -target=%TARGETS% -unrealexe="%UE_CMD%" -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory="%UE_ARCHIVE%" -manifests -CrashReporter -clientconfig=%CLIENT_CONFIG% -nodebuginfo %UE_COOKER%" -nocompile -nocompileuat
I've been digging into this because of cooker issues we are having with Niagara VFX where the GpuComputeScripts are missing from builds when we run both Client and Server targets in the same cook. The only solution we have found is to try and try again until VFX have the GpuComputeScript parts or build client and server separately.
This is a script we have been running to check if the VFX are valid or not:
# PowerShell script for Jenkins to check NiagaraGpuScript*Count in the latest cook log
# Define the log directory
$logDir = "$ENV:WORKSPACE\Engine\Programs\AutomationTool\Saved\Logs"
# Find the latest Cook-*.txt file
$latestLog = Get-ChildItem -Path $logDir -Filter "Cook-*.txt" |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if ($null -eq $latestLog) {
Write-Error "No cook log file found in $logDir"
exit 1
}
$logPath = $latestLog.FullName
Write-Output "Checking log: $logPath"
# Read the log content
$content = Get-Content $logPath
# Find lines matching NiagaraGpuScript*Count=number
$gpuLines = $content | Where-Object { $_ -match "NiagaraGpuScript.*Count=\d+" }
if ($gpuLines.Count -eq 0) {
Write-Error "No NiagaraGpuScript*Count lines found in the log"
exit 1
}
# Check if any value is not 0
$anyNonZero = $false
foreach ($line in $gpuLines) {
if ($line -match "Count=(\d+)") {
$value = [int]$matches[1]
Write-Output "Found: $line (value: $value)"
if ($value -ne 0) {
$anyNonZero = $true
}
}
}
if ($anyNonZero) {
Write-Output "Success: At least one NiagaraGpuScript*Count is not 0"
exit 0
} else {
Write-Error "Failure: All NiagaraGpuScript*Count values are 0"
exit 1
}
Does anyone else have this issue and what are you guys doing to fix Client+Server builds missing Niagara GPU VFX?