PCG Editor Mode tools ignore active CurrentLevel and always spawn new target actors in PersistentLevel

When working in a traditional level-streaming setup (Persistent BaseLevel + streamed SubLevel), creating a new PCG tool actor via PCG Editor Mode (e.g., using DrawSpline or Area tools with no prior actor selected) always spawns the new actor inside the PersistentLevel, even when a SubLevel is explicitly set as the active CurrentLevel in both the Levels tab and the Viewport Current Context widget.

If an existing actor that already resides in the SubLevel is selected prior to running the tool (or moved to the SubLevel afterward), PCG Mode edits and evaluates it within the SubLevel (PCGWorldActor) without issue. The bug occurs strictly during the initial actor creation/spawning step when the tool initializes.

BaseLevel.png(917 KB)
Fixed.png(784 KB)
ActiveLevel.png(10.8 KB)
SubLevel_01.png(173 KB)
Creating.png(787 KB)
Moving.png(44.3 KB)

Steps to Reproduce

I have attached reference screenshots for the same. The steps refer to the screenshots for naming conventions.

  1. BaseLevel: Main level that contains other sub-levels through Level Streaming.
  2. SubLevel_01: Empty sublevel that contains nothing.

---

Steps to Reproduce:

  1. Create a standard non-World Partition level (BaseLevel) and add a streaming sublevel (SubLevel_01) in the Levels panel.
  2. Double-click SubLevel_01 in the Levels window (or use the bottom-right Viewport Current Context -> Level dropdown) so that SubLevel_01 is the active level context.
  3. Ensure no actors are currently selected in the Outliner.
  4. Switch to PCG Mode (Shift + 9 / Mode Dropdown) and activate an interactive creation tool (e.g., DrawSpline or Area).
  5. Draw points in the viewport and click Accept.

Expected: The newly spawned PCG tool actor (e.g., PCG Area Tool Actor) is spawned inside the active SubLevel_01 (World->GetCurrentLevel()), matching standard Unreal Editor actor placement behavior.

Actual: The newly spawned PCG tool actor is placed in BaseLevel (Persistent). While drawing, the bottom-right viewport overlay simultaneously shows

Current Context -> Level: SubLevel_01 and

Selected Actor(s) in BaseLevel (Persistent).

Probable Cause: When the PCG interactive tool spawns its target actor upon initialization, FActorSpawnParameters::OverrideLevel appears to be left as nullptr (defaulting UWorld::SpawnActor to PersistentLevel) rather than passing World->GetCurrentLevel().

---

Fix:

  1. Post-Spawn Move: Right-click the active SubLevel_01 in the Levels panel and select Move Selected Actors to Level, then click Cleanup > Generate on the PCG Component.
  2. Pre-Spawn Target: Select an existing PCG actor inside the SubLevel (or place an Empty Actor in SubLevel first) before activating the PCG Mode tool so it attaches to the existing SubLevel context.

Hi,

Thanks for the detailed report. I was able to reproduce the problem and create a fix. This problem does not qualify to be resolved in a hotfix so I am attaching the code to this answer.

I will work on pushing the fix to the Main streams for a future release.

Regards,

Martin

[Attachment removed]

Here you go! I had to zip it to bypass the extension filter.

Martin

[Attachment removed]

Hi Martin thanks for this

We are actually using UE5_Partner-VP-5.8 stream, which includes 59361245, so this this diff doesn’t cleanly apply.

In your README you mention

>For UE5/Main or UE6/Main, use EPS-fix-UE5Main-UE6Main.diff from the case folder instead (the file differs there).

I presume this would be the .diff that we actually need in this case to make it apply cleanly? Would it be possible to attach that? I don’t think I have access to the case folder

Kind regards

Luke

Hi Martin,

Thanks for the speedy resolution. We have tested the fix on our end, and it works as intended!

Marking your original reply as the solution.

Best Regards,

Varun