/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h
Returns the WorldContext for the PIE world, by default will get the first one which will be the server or simulate instance. You need to iterate the context list if you want all the pie world contexts.
[FWorldContext](API\Runtime\Engine\Engine\FWorldContext) * GetPIEWorldContext ( int32 WorldPIEInstance )