/Engine/Source/Editor/UnrealEd/Public/EditorViewportClient.h
Use the viewports Scene to get a world. Will use Global world instance of the scene or its world is invalid.
A valid pointer to the viewports world scene.
virtual [UWorld](API\Runtime\Engine\Engine\UWorld) * GetWorld() const