Announcement

Collapse
No announcement yet.

Editor Utility Widgets Feedback

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Hi! Thanks for the amazing system! I come here with a problem though I can't spawn a tab from C++.

    I put a plugin on the Marketplace and a customer let me know that it's hard to find it in the Content Browser. It turns out that it's a part of Engine Content when installed from Marketplace. So what I'm trying to do is to add a menu button to the level editor (Window -> My tool) that will spawn the Utility Widget.

    The linker complains:
    error LNK2019: unresolved external symbol "private: static class UClass * __cdecl UEditorUtilityWidgetBlueprint::GetPrivateStaticClass(void)"
    error LNK2019: unresolved external symbol "public: class TSharedRef<class SDockTab,0> __cdecl UEditorUtilityWidgetBlueprint::SpawnEditorUITab(class FSpawnTabArgs const &)"
    Is it on purpose that EditorUtilityWidgetBlueprint.h is not a part of BLUTILITY_API? If yes, then at least an exposed function for that purpose would be very useful.

    I based my function on AssetTypeActions_EditorUtilityWidgetBlueprint.cpp. I also followed the invaluable tutorial by IsaraTech, but they just skipped the spawning part (probably due to the same problem)

    Below is the part of my code that causes trouble:

    Code:
    if (!LevelEditorTabManager->CanSpawnTab(RegistrationName))
    {
        IBlutilityModule* BlutilityModule = FModuleManager::GetModulePtr<IBlutilityModule>("Blutility");
        UEditorUtilityWidgetBlueprint* WidgetBlueprint = Cast<UEditorUtilityWidgetBlueprint>(Blueprint);
        WidgetBlueprint->SetRegistrationName(RegistrationName);
        LevelEditorTabManager->RegisterTabSpawner(
            RegistrationName,
            FOnSpawnTab::CreateUObject(WidgetBlueprint, &UEditorUtilityWidgetBlueprint::SpawnEditorUITab)
        ).SetDisplayName(DisplayName).SetGroup(BlutilityModule->GetMenuGroup().ToSharedRef());
    
        BlutilityModule->AddLoadedScriptUI(WidgetBlueprint);
    }
    Last edited by Oskar Świerad; 07-24-2019, 05:04 PM.
    Tech Art Aid tutorials - shaders, procedural techniques, optimization

    Comment


      #77
      Originally posted by Oskar Świerad View Post
      Hi! Thanks for the amazing system! I come here with a problem though I can't spawn a tab from C++.

      I put a plugin on the Marketplace and a customer let me know that it's hard to find it in the Content Browser. It turns out that it's a part of Engine Content when installed from Marketplace. So what I'm trying to do is to add a menu button to the level editor (Window -> My tool) that will spawn the Utility Widget.

      The linker complains:


      Is it on purpose that EditorUtilityWidgetBlueprint.h is not a part of BLUTILITY_API? If yes, then at least an exposed function for that purpose would be very useful.

      I based my function on AssetTypeActions_EditorUtilityWidgetBlueprint.cpp. I also followed the invaluable tutorial by IsaraTech, but they just skipped the spawning part (probably due to the same problem)

      Below is the part of my code that causes trouble:

      Code:
      if (!LevelEditorTabManager->CanSpawnTab(RegistrationName))
      {
      IBlutilityModule* BlutilityModule = FModuleManager::GetModulePtr<IBlutilityModule>("Blutility");
      UEditorUtilityWidgetBlueprint* WidgetBlueprint = Cast<UEditorUtilityWidgetBlueprint>(Blueprint);
      WidgetBlueprint->SetRegistrationName(RegistrationName);
      LevelEditorTabManager->RegisterTabSpawner(
      RegistrationName,
      FOnSpawnTab::CreateUObject(WidgetBlueprint, &UEditorUtilityWidgetBlueprint::SpawnEditorUITab)
      ).SetDisplayName(DisplayName).SetGroup(BlutilityModule->GetMenuGroup().ToSharedRef());
      
      BlutilityModule->AddLoadedScriptUI(WidgetBlueprint);
      }
      In 4.23 Preview, the Editor Utility Subsystem has a function SpawnAndRegisterTab that should be able to help with that, and it just takes the Editor Utility Widget Blueprint as an input.

      Comment


        #78
        Amazing! Thanks
        Tech Art Aid tutorials - shaders, procedural techniques, optimization

        Comment


          #79
          I was wondering if it's possible in any way with the current Editor Utility mechanics to compile the lights for a level (and get notified when it's done), would be really great for automatizing the process of rebuilding multiple levels when some global setting, actor, material or sublevel changes.
          LinkedIn, Engine Contributions
          Polars (WIP), Game Jam Projects
          Marketplace: Viewport Utilities, Blueprint Streams, Control Structures

          Comment


            #80
            Originally posted by Shadow.Storm View Post

            In 4.23 Preview, the Editor Utility Subsystem has a function SpawnAndRegisterTab that should be able to help with that, and it just takes the Editor Utility Widget Blueprint as an input.
            That's great!!
            I have a question though, im working on a project that is still in 4.22, is there anyway getting a reference of the Editor Utility Widget within a regular widgetblueprint? right now, I get warning that it can not access the variable called EditorWidget (a variable ref to my editor utility widget)

            Comment


              #81
              Originally posted by Rosium View Post

              That's great!!
              I have a question though, im working on a project that is still in 4.22, is there anyway getting a reference of the Editor Utility Widget within a regular widgetblueprint? right now, I get warning that it can not access the variable called EditorWidget (a variable ref to my editor utility widget)
              Hi! So, as early as 4.22, we began enforcing a stronger line between editor code and runtime code. It's safe to reference runtime code in editor code, since you have to have it for things like Play In Editor testing. It's not safe to reference editor code in runtime code, as you may be trying to access data that doesn't exist and could crash, etc. You can reference a regular widget blueprint in an editor widget blueprint, but the case you are trying won't be supported.

              Comment


                #82
                Hey all so first of all editor widgets are my best friend atm, i do everything with them. There is one thing i would like added that i find is needed, The ability to create child bps through the widget, I know it can be done by making a factory but as it is already available through right clicking a similar func would be useful

                Comment


                  #83
                  Out of the curiosity, Is there a reason why you can not call functions that there were created within the editor utility widget within a regular widget blueprint?

                  Comment


                    #84
                    Originally posted by Rosium View Post
                    Out of the curiosity, Is there a reason why you can not call functions that there were created within the editor utility widget within a regular widget blueprint?
                    Editor Utility Widgets Cannot be used on Run Time which is the only way you'd be able to access a normal widget

                    Comment


                      #85
                      Originally posted by SinkingShipEnt View Post

                      Editor Utility Widgets Cannot be used on Run Time which is the only way you'd be able to access a normal widget
                      Sorry for the late reply, i lost this thread in my notes, I understand, i figured it would be a runtime issue. but i may have to disagree with you a little bit, i was able to call functions created within the editor widget into a regular widget through event dispatchers. you just need a way to save information.

                      if i may ask, would you know a way of the resetting a widget after you click "Run"?

                      Comment


                        #86
                        I am wondering if anyone knows how to get references to actors that were spawned in runtime. I can GetAllActorsOfClass for actors that were placed in edit mode, but I cannot get actors that were spawned. Does anyone know how to do this?

                        I cannot use get actors in level as they can no longer be used in PIE.

                        Thanks.

                        EDIT: Oh it seems this might be getting fixed in 4.23 with the world context input being exposed on nodes. Getting the game world, and piping that into GetAllActorsOfClass allows you to get actors spawned in runtime.

                        I guess there isn't a way of getting actors from the game world before this change? Perhaps in code?
                        Last edited by Clampy; 08-19-2019, 03:01 PM.

                        Comment


                          #87
                          Can we have some UMG styling system and an Editor Style so these widgets can actually look like real editor tools instead of being totally out of place?

                          Comment


                            #88
                            Is there a way to properly spawn the widget on button press or to add the editor widget to the main toolbar of the ue4 editor?

                            Comment


                              #89
                              Originally posted by Rosium View Post
                              Is there a way to properly spawn the widget on button press or to add the editor widget to the main toolbar of the ue4 editor?
                              Mine always opens here
                              Click image for larger version

Name:	Untitled.png
Views:	57
Size:	523.7 KB
ID:	1655506

                              Comment


                                #90
                                I've been working on a tool for a while, using Editor utility widgets.
                                The WIP page of the tool is over here: https://forums.unrealengine.com/comm...-unused-assets

                                I've collected all my feedback (features I thought were missing) as i was going through it, it's listed below. (this is all from 4.23)

                                Editor widgets are awesome, they're really close to being 100% there, if the biggest pain points were resolved.
                                The biggest pain points were UI (creating editor specific UI, like tables with columns that can be resized and sorted, matching the editor style, dealing with listviews etc...), and being able to access a few more editor specific things.
                                • Tables: we could really use a UMG element that is a proper table and has rows/columns that can be resized and sorted. (best example is the "statistic" window in the editor.)
                                • Multi selection in a list view is either completely broken or only works with keyboard? You can't ctrl+click or shift+click to select multiple lines, but using the keyboard (shift + up/down) works.
                                • Ability to use Data in ListView, not just objects. It might not make sense code wise, but the result is that I'm having to create a new Object class, with a variable that contains my data and have an instance constructed for every single item in my list, so that it can be added to the listView.
                                  These objects have no other use than working around the limitation. So it's kind of a waste, if we could directly use AssetData instead, there'd be no need for that object class.
                                • Ability to call other tools from an Editor Widget, for example I would have wanted to call the Size Map tool from my BP and tell it to analyze a specific asset, or the reference viewer for a specific asset.
                                • A way to use the editor UI style as a template, at least when making Editor Widget, so we don't have to always recreate the styles for every window, every button etc...
                                • No access to detailed info on Assets (icons, thumbs, file size, parent material, location on disk,...) all that extra info that the content browser has when you use the columns view or hover on a file.
                                • Having access to all of the editors icons, there are a few in the Engine content, but most viewport, content browsers and tools icons are not accessible.
                                • Being able to have a custom right click menu that can be different depending on which element of the widget was clicked (if i right click the "path" of an item i get options to locate, but if i right click the name of an item i get options to "rename")
                                • A way to register an editor widget to the editor window menu at a specific location or make it a button somewhere, not just appear in Editor Utility Widget.
                                • A way for a plugin be made dependent of another plugin so users are warned, or automatically activates the required plugin.
                                • A Blueprint to create or edit a collection in the content browser
                                • A Blueprint to "Locate in Explorer"
                                • A blueprint to delete an asset with the standard "Delete Assets" dialog. The current delete asset blueprint deletes the asset straight away without warning, and doesn't show the very useful "delete Assets" window that shows all references and allows you to replace them
                                • Blueprints for file operations using built in UE dialogs for user to specify paths/names (like move, rename, create, pick file/folder etc...) there are BPs called "do... with Dialog" but they don't seem to do what the name suggests.
                                • A Blueprint to "Fix up redirectors"
                                • A Blueprint to get current selection or folder in Content Browser
                                • Blueprint to output to Message log (not output log), and specify which category
                                • A system dialog box popup (Are you sure yes/no, or a OK window)
                                Thanks!
                                Last edited by Christoufu; 08-26-2019, 04:48 AM.

                                Comment

                                Working...
                                X