4.23: How to auto-start Editor Utility Widgets? (new feature)

From the 4.23 release notes:

(added)* “The ability to add a Run function to any Editor Utility Blueprint or Editor Utility Widget which will run scripts on Editor start. This will create an instance and allow for binding to stateful editor events.”*

I see the Run event in the Editor Utility Widget, but it doesn’t fire on editor start.
How to use this new “Run” feature? I need to open Editor Utility Widget on editor start or on map load. Is there any example on how to use it?

Spent 6 hours banging my ahead against the wall, finally figured it out.

The following lines must go into DefaultEditorPerProjectUserSettings.ini:
[/Script/Blutility.EditorUtilitySubsystem]
+StartupObjects="/Game/FinalTest.FinalTest"

That is for a blueprint called FinalTest that resides in your /Content/ folder.

You create the blueprint like this:

Mine inherits from Editor Utility Object, but I imagine other classes would work too.

They forgot to expose this stuff to Edit > Project Settings, so you gotta do it manually.

8 Likes

Thanks, that works.
I was searching for a way to automatically add an Editor Utility Widget on editor start/map load (they removed in-editor ticking in 4.23 and I’m searching for a workaround) and it looks like it’s not possible (Tick/ SetTimer also doesn’t work when fired from the Run function), but at least the Run function works on editor start.

Try:
[/Script/Blutility.EditorUtilitySubsystem]
+LoadedUIs=“/Game/EditorWidget.EditorWidget”

(I haven’t tried it myself)

(also, you may want to set some inherited boolean in the widget to true, it has “run” in its name, I forgot the exact name)

Just tried that, it doesn’t seem to work, but thanks!
I’ve set the AutoRunDefaultAction to true.

Hi folks!

The answer about:
[/Script/Blutility.EditorUtilitySubsystem]
+StartupObjects=“/Game/FinalTest.FinalTest”

is correct. If you wanted to have the Run function you set up launch an Editor Utility Widget at start, you can use the Spawn and Register Tab function.

Hi @Shadow.Storm , thank you, that works!
For anyone wondering how to use this function:

I’m trying to use the auto-starting widget as a workaround to have in-editor ticking, since in 4.23 the editor utilities don’t tick anymore (besides widgets, more info hereand here).
So I’m thinking about using an Editor Utility Widget as a “Tick Provider” for all other in-editor actors that can’t tick anymore. Not ideal, but in case if the lack of in-editor ticking in Editor Utility Actor not being fixed, I guess that’s the only way.

4 Likes

Some random feedback:
In a new project, editor utility widgets are always spawned at the screen center at first. It would be nice to have a way to automatically dock them e.g. next to the World Outliner tab or somewhere else. It’a s minor thing, since once we dock it once it stays that way, but it would be a nice addition for new users, when starting from a new project… So they wouldn’t need to dock the widget by hand.

Is this still working in 4.24? I´m not able to reproduce those results. I have an editor widget, the Event Run and also turned on Auto run default action. I added the path to my widget in the DefaultEditorPerProjectUserSettings.ini but nothing happens on startup.

Update: I found the mistake. It seems like the subsystem is not loaded at the time it tries to get the reference in the run node. It is not able to validate itself.

Hi, how did you make it validate?

(I’m using 4.27)

Edit: Seems like when you first run it manually with the run option and close the editor it seems to remember to keep it open the next time you open the project. Doesn’t seem to work if you haven’t opened it prior to closing the project.

I know it’s been a while since last reply, but maybe someone else will stumble upon this thread and it may help.
In documentation it says you have to put ini in platform-specific folder, it doesn’t work for me. I had to put it directly under Config folder, not platform-specific sub-folder.
As for starting up from plugin, just right-click on the asset and choose copy-reference, don’t forget to delete surronding “Blueprint’ '” around the asset
Blueprint'/PluginName/UBP_Startup.UBP_Startup'
should become:
PluginName/UBP_Startup.UBP_Startup

3 Likes

Good, I’m on 4.27, I’ve tried every way to start a UtilityEditorObject in the DefaultEditorPerProjectUserSettings.ini but there’s no way, I don’t even get anything in the log. I use the compiled editor from github. Any suggestions?

I managed to get it working after a time. You have to add the UtilityEditorObject to the ini file like shown in the documentation, you have to also remeber to override the script startup function of the blueprint, I tried ever which way until I changed that and it started working for me with editor widgets on 4.27.