Description

Context

UEditorEngine::OnAllPIEInstancesStarted() is a virtual function that gets called when launching Play-in-Editor. It can be overridden if the game project chooses to introduce a subclass of UEditorEngine. When not using an Online Subsystem, the PIE instances have no async login process and are considered logged in immediately.

Problem

When starting PIE without using an Online Subsystem, UEditorEngine::OnAllPIEInstancesStarted() is called multiple times, while there are still game clients PIE instances left to be created. The function doesn’t behave as its name implies.

This appears to stem from NumOutstandingPIELogins being incremented per client, and immediately decremented when login is skipped and OnLoginPIEComplete_Deferred is called. This happens inside the outer loop in UEditorEngine::StartPlayInEditorSession, that may spawn more PIE clients.

Proposed solutions

OnAllPIEInstancesStarted should only be considered to call after all PIE instances have been created. We could either defer the OnLoginPIEComplete_Deferred calls, but this has a side effect that the PIE instance is called later and could have ramifications. We can also defer the call to OnAllPIEInstancesStarted(), where the potential impact is only on projects that override that virtual.

Steps to Reproduce
  • Put a breakpoint on UEditorEngine::OnAllPIEInstancesStarted(), or add a UE_LOG statement, or override it in a UEditorEngine subclass.
  • In Editor play settings, set Number of Players to 3.
  • Set NetMode to Client.
  • Set PIE to run under a single process.
  • Launch PIE
  • Observe: OnAllPIEInstancesStarted() gets called multiple times, while PIE instances are still starting
  • Expected: OnAllPIEInstancesStarted() gets called once, after all PIE instances have started
Callstack

Non-fatal. This callstack is for reference of where the relevant code lives:

 	UnrealEditor-UnrealEd.dll!UEditorEngine::OnLoginPIEComplete_Deferred(int LocalUserNum, bool bWasSuccessful, FString ErrorString, FPieLoginStruct DataStruct) Line 1621	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::CreateNewPlayInEditorInstance(FRequestPlaySessionParams & InRequestParams, const bool bInDedicatedInstance, const EPlayNetMode InNetMode) Line 1909	C++
>	UnrealEditor-UnrealEd.dll!UEditorEngine::StartPlayInEditorSession(FRequestPlaySessionParams & InRequestParams) Line 2929	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::StartQueuedPlaySessionRequestImpl() Line 1212	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::StartQueuedPlaySessionRequest() Line 1110	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2058	C++
 	UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 534	C++

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-361591 in the post.

0
Login to Vote

Unresolved
ComponentUE - Gameplay
Affects Versions5.55.65.7
Target Fix5.8
CreatedJan 21, 2026
UpdatedJan 21, 2026
View Jira Issue