How to spawn Actor from Plugin without play mode

Hello, I am trying to spawn an actor object and add it to the world outliner in the editor.
Since no previous objects exists as this is spawned from a plugin button, there isn’t anything to get UWorld from.
How can I spawn an actor to the editor from inside C++ plugin code ?

GEditor->GetEditorWorldContext() will return you the world context for the Editor world. You can then use SpawnActor to spawn actors just like you would in play mode.

Thanks, worked like a charm