Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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.
    Last edited by CodeSpartan; 09-08-2019, 08:08 AM.
    MMO Starter Kit
    Dialogue Plugin
    Voxel Plugin
    Character Customization: Female
    Character Custmization: Male

    Comment


      #3
      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.

      Comment


        #4
        Originally posted by Slavq View Post
        I was searching for a way to automatically add an Editor Utility Widget 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)
        Last edited by CodeSpartan; 09-08-2019, 09:37 AM.
        MMO Starter Kit
        Dialogue Plugin
        Voxel Plugin
        Character Customization: Female
        Character Custmization: Male

        Comment


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

          Comment


            #6
            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.

            Comment


              #7
              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 here and 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.

              Comment

              Working...
              X