Short native and recording check
Use the actual owned editor/game and the same staging path as the planned take. Follow the project's native-process and slot rules. A packaged-game recording needs only the recording check; do not open an editor to check unused APIs.
Native staging
Exercise changed Unreal Python calls in the installed editor before waiting for
playback. Reuse the capture path's own staging code on its own assets. For the
asset-editor cleanup path, this fragment runs in Unreal's Python console/script;
set capture_folder to this run's existing asset folder first:
import unreal
assert capture_folder.startswith("/Game/") and capture_folder.rstrip("/") != "/Game"
assets = unreal.EditorAssetLibrary.list_assets(capture_folder, recursive=True)
assert assets, "Expected this run's staged assets"
subsystem = unreal.get_editor_subsystem(unreal.AssetEditorSubsystem)
loaded = [unreal.find_asset(path) for path in assets]
loaded = [asset for asset in loaded if asset is not None]
assert loaded, "Stage the capture assets before testing their editor cleanup"
for asset in loaded:
subsystem.close_all_editors_for_asset(asset)
print("NATIVE_CAPTURE_API_CHECK: PASS (calls completed; closure not observed)")
This catches a missing binding and exercises find_asset on real loaded assets.
It does not prove an editor closed, playback progressed or the camera fits.
Run any other changed staging calls too; a generic capability list cannot cover
the capture path. Keep the native exception or PASS line with the trial take.
Three-second take
Use the existing project recorder for this check when one is proven; for SCK, retain its first complete frame and native finalizer. Do not add a CLI screenshot prerequisite to that path. Reuse valid unchanged short-take evidence.
For the native CLI alternative, set CAPTURE_WINDOW_ID to the verified owned window ID, keep its bounds fixed,
and keep it alive while this finishes. Use a fresh output directory. Run these
commands in order and stop on any nonzero exit:
screencapture -v -V3 -l"${CAPTURE_WINDOW_ID:?set the owned window ID}" trial.mov
ffmpeg -v error -xerror -i trial.mov -map 0:v:0 -f null -
ffprobe -v error -count_frames -select_streams v:0 \
-show_entries stream=nb_read_frames,duration,avg_frame_rate -of json trial.mov
ffmpeg -v error -xerror -i trial.mov -vf fps=1 -frames:v 3 -n trial-%02d.png
For fixed-rate region capture, use the chosen ffmpeg recording command from
the skill with -t 3, then the same decode and inspection steps.
Inspect the actual movie and extracted frames: the requested subject stays in
frame, the intended action advances, and overlays/cropping do not hide it.
Confirm decoded frames and positive duration; a sparse stationary take is not
proof of moving playback. Record the measured rate, not the requested rate.
Proceed to the full take after this passes. The short take checks capture setup; it does not establish full-route correctness, sustained pacing or clean final teardown. Keep those checks on the real deliverable and reuse the existing recorder/finalizer rather than building another harness.
