UAF module with InitMethod=InitializeAndPauseInEditor never pauses in EditorPreview worlds

Summary

A UAFComponent left at the default InitMethod (InitializeAndPauseInEditor) is supposed to run one initial update and then pause in editor worlds (AnimNextModuleInitMethod.h:17: “pause in editor only”). It does pause in the level-editor world, but in an EditorPreview world (e.g. the Blueprint editor preview scene) it never pauses - the module ticks every frame for as long as the preview viewport is open.

Cause (ue5-main line numbers): the self-disable after the module’s first update only checks EWorldType::Editor (ModuleTickFunction.cpp:96). The two sibling checks treat Editor and EditorPreview the same (AnimNextComponent.cpp:101, SystemReference.cpp:529-530), and preview scenes are EWorldType::EditorPreview (PreviewScene.cpp:39).

One-line fix proposed in https://github.com/EpicGames/UnrealEngine/pull/15040 - adds EditorPreview to the condition, matching the sibling checks.

Repro’d on 5.8.1; code unchanged on ue5-main as of 2026-08-03.

What Type of Bug are you experiencing?

Animation

Steps to Reproduce

  1. Actor Blueprint with a UAFComponent running a module that executes an animation graph (e.g. via a PrePhysics event). InitMethod left at the default (InitializeAndPauseInEditor).
  2. Open the actor’s Blueprint editor so the preview viewport ticks.
  3. Watch the output log.

Expected Result

Same as the level-editor world: one initial update, then the module pauses.

Observed Result

The module never pauses; it updates every frame until the Blueprint editor is closed. In my project it shows up as this pair every frame, because the preview instance’s mesh output binding isn’t valid there:

LogAnimation: Warning: FRigUnit_AnimNextRunAnimationGraph_v2::Execute: Could not run graph - Ref Pose is invalid. [Asset: …] [HostGraph: None] [Actor: /Engine/Transient.World_1:PersistentLevel.BP_MoverPawn_C_0]
LogAnimation: Warning: Could not write to skeletal mesh component - LOD Pose is not valid.

One pair at editor load (the single init tick) is expected; the per-frame repeat is the bug. Even with a valid binding, running the module every frame in every open preview scene defeats the point of the default InitMethod.

Affects Versions

5.8

Platform(s)

Windows