/Engine/Source/Editor/UnrealEd/Public/EditorWorldUtils.h
A helper RAII class to initialize / destroy an editor world. The world will be added to the root set and initialized as an editor world using the provided initialization values. On destruction, will destroy the world and unroot it. This class will also set GWorld & the EditorWorldContext to this world.
class FScopedEditorWorld