GregOrigin - PSO Autopilot: Shader Compilation Warm-up System to Prevent Lag & Crashes

New editable sample widgets + BP for those interested:

CreateEditableLoadingWidget.py (5.6 KB)
LoadingWidgetTemplates_README.md (2.4 KB)

1 Like

1.3.1a, 2026-06-04

Bug Fixes

• Fixed Infinite Loading Screen: Resolved an emergent deadlock issue where the loading screen would hang indefinitely at “Finding startup assets…” when launching in Standalone Game mode. The plugin now correctly binds and listens to the Asset Registry OnFilesLoaded delegate without prematurely yielding the tick.
• UE 5.7 Compilation Fix: Fixed an “incomplete type” / “unrelated pointers” compilation error in PSOAutopilotSubsystemHelpers.cpp on Unreal Engine 5.7 by adding the explicit include “UObject/Package.h” dependency for GetTransientPackage() during NewObject construction.

1 Like

Video update on v1.3:

1.3.2 update, 2026-06-13 :dizzy:

:sparkles: Features

  • :control_knobs: Per-platform performance overrides. A new Per-Platform Performance Overrides list (FPSOAutopilotPlatformOverride) lets you replace the effective items-per-step, frame-time budget, memory-cleanup, and pipeline-cache wait on a named platform (Windows, Mac, Linux, Android, IOS). An enabled override matching the running platform is overlaid onto the runtime snapshot; disabled or non-matching entries are ignored.
  • :abacus: CI coverage commandlet. New headless PSOAutopilotCoverage commandlet resolves the configured warmup content via the asset registry, prints a per-type coverage report, and returns a non-zero exit code when discovered assets fall below -MinAssets=<N>, so a content/cook regression fails the build. Run: UnrealEditor-Cmd.exe <project> -run=PSOAutopilotCoverage -MinAssets=50. Its dedup/counting/threshold accounting is extracted into FPSOAutopilotCoverageReport and unit-tested.
  • :robot: One-command CI gate. New Scripts/Run-CI.ps1 chains build → PSOAutopilot.* automation tests → coverage gate and fails fast on the first failed stage, for local pre-flight or a CI runner. The coverage floor defaults to -MinAssets 900, so losing the demo content set fails the gate.

:wrench: Internal Hardening (settings → runtime snapshot)

  • :level_slider: Single source of truth for Simple-preset tuning. The Simple preset → performance-tuning mapping is now one shared helper (ApplySimplePresetTuning) applied identically to the persistent settings object and the runtime snapshot, so the two can never drift.
  • :puzzle_piece: Snapshot round-trip safety. CaptureFrom and ApplyTo now share one field list (PSO_SNAPSHOT_COPYABLE_FIELDS X-macro), so adding or removing a snapshot-copied setting cannot desync capture and restore.
  • :test_tube: Effective-capture overlay. CaptureEffectiveFrom layers the Simple-mode seed and the per-platform override over the raw capture; Advanced mode passes raw content through unchanged.
  • :sponge: Runtime snapshot sanitize. FPSOAutopilotSettingsSnapshot::Sanitize() trims, de-duplicates, and clamps the snapshot before warmup consumes it (wired into the live warmup start path alongside CaptureEffectiveFrom).
  • :stopwatch: Pipeline-flush tracker extracted. The engine pipeline-cache flush accounting (cumulative compiled vs. newly-discovered PSOs on a non-monotonic queue, drain fraction, and a sliding-window completion rate for the ETA) is now an isolated, unit-tested FPSOPipelineFlushTracker.

:bug: Bug Fixes

  • :floppy_disk: “Apply Simple Setup” no longer wipes manually-configured Advanced content. A previous code change introduced a nasty conflict: Applying Simple Setup reset the Advanced Content Folders, Specific Content to Prepare, and Content to Load Before Play lists, discarding any maps, assets, or packages entered directly in Advanced mode. Simple Setup choices are now merged into those lists, so existing Advanced entries are preserved.
  • :broom: No duplicate entries when merging. Folders are de-duplicated by path (and the gameplay seed level by asset path), so re-applying Simple Setup does not create repeated entries.

:books: Notes

  • The merge is additive: only the persistent Advanced fields are affected. Simple-mode warmup still runs from a clean Simple snapshot, so this change does not alter what Simple mode actually warms.
  • Because the merge is additive, changing Level To Open After Warmup and re-applying Simple Setup can leave the previous seed level listed in the Advanced lists. This only adds one extra, harmless warmup entry; remove it manually if undesired.
  • Thank you to Arash_R for pointing this out soon after the last release.

:white_check_mark: Validation

  • :test_tube: 10 automation tests pass (Automation RunTests PSOAutopilot, NullRHI), exit code 0: SettingsPresetTuningParity, SettingsSnapshotRoundTrip, SettingsEffectiveCapture, SettingsSanitize, SettingsPlatformOverride, PipelineFlushTracker, SettingsSimpleSetupMerge, LiveSmokeTest, CoverageReport, CoverageFolders.
  • :abacus: Coverage commandlet verified on both paths against the project (1001 discovered assets): -MinAssets=0 → “Coverage gate passed (1001 >= required 0)”, exit 0; -MinAssets=5000 → “Coverage gate FAILED … below … 5000”, exit 1.
  • :robot: Scripts/Run-CI.ps1 runs build + tests + coverage green end-to-end (exit 0).

PS1 files are not allowed in Fab packages. I provide them here for those interested in up-to-date validation and integration scripts:

Run-CI.ps1 (9.8 KB)
ShippingValidation_README.md (1.8 KB)
Build-ShippingValidation.ps1 (11.8 KB)