Set Actor Label in Editor (from C++)


I am working on an editor plugin. So my problem arises in the editor, and is not relevant at runtime.

One thing it does is that from within a custom window, the user can click a button and spawn a specific object into the level, after giving it a name in a small popup window.

Now, when creating multiple objects, in the editor outline they will have the traditional
“MyObject3” names.
Since the user gets to input a name though before spawning, I would like that name to be the one used in the editor as well.

I tried using SetActorLabel after spawning it, but that will (as the Docs state) not work in all editors…and since its a plugin I cannot know what type of editor others will use.

Is there any way to set the label seen in the editor outline that will always work, independant of editor setup?