Creating levels procudurally and keep them in the editor

So,
I have a function in C++ that creates a simple maze by spawning actors. I can call that function in-game at “Begin level event” or with some key, that is no problem. The problem is: I would like to keep my generated Actors when I stop playing, so I could play around with my maze in the Editor.

In Unity3d p.e. I could call that CreateMaze() function at editor runtime, is something like that possible in UE4?

I too would like to know this! If this turns out not to be possible, you could potentially make your c++ function available via blueprints and add it to a construction script. The Construction script can be placed in your level during editing and spawns whatever the logic inside it dictates. (In this case, your maze).

Here are two related questions:

https://answers.unrealengine.com/questions/22052/how-can-i-place-actors-in-a-level-using-code-or-bp.html