/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorLevelLibrary.h
Find the World in the world editor. It can then be used as WorldContext by other libraries like GameplayStatics.
The World used by the world editor.
[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | Level Utility", Meta=(DeprecatedFunction, DeprecationMessage="The Editor Scripting Utilities Plugin is deprecated - Use the function in Unreal Editor Subsystem")) static [UWorld](API\Runtime\Engine\Engine\UWorld) * GetEditorWorld()