Announcement

Collapse
No announcement yet.

Editor Utility Widgets Feedback

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

    #31
    Is there currently a way for a Utility Widget to detect whether the world type is in Editor, PIE, or Game Instance? Or to disable a utility widget while in PIE or Game Instance mode?

    Currently, I have a tick event used to detect whether the scene or selection set has become dirty since last frame.

    Without events for these things, the tick hits utility functions like GetAllLevelActors and spams a LogEditorScripting error.

    I have tried Rama's blueprint functions that return what world mode the logic is running in. This returns true for editor always, and false for PIE always from within the Utility Widget.

    Getting the GameInstance (via GetGameInstance) always returns none.

    In fact, trying to get any actor by class returns none.

    I just need a way to escape the Utility Widget's tick while in either PIE or Game Instance or otherwise disable the Utility Widget during these modes.

    Any ideas?

    Comment


      #32
      Originally posted by Spoondog View Post
      General editor utility requests:
      Editor events:
      just ran into another event that would be useful and is editor-utility-widget-specific:

      Event On Editor World Loaded - event when the user loads a new level in the editor, so you can refresh your utility widget, discard stuff related to the previous map and/or load metadata from the newly-loaded map.

      I currently hack it by checking in tick (every x sec) if the loaded world has changed.
      Last edited by Spoondog; 04-24-2019, 08:11 PM.
      Dev Blog
      Twitter: @TheRealSpoonDog
      150 FREE Blueprint functions for your project

      Comment


        #33
        Alright here's another one:

        TLDR: Feature request for:
        1. "Get All Subclasses of Class" node, so we can populate editor utility widget dropdowns with classes for the user to pick from, and
        2. The "Soft Class Path" equivalents of Soft Object Path's "To Soft Object Reference" and "Break Soft Object Path" nodes, so we can convert a string (from e.g. a combobox selection) to a class reference (for spawning things etc).
          Click image for larger version  Name:	softclasspath.PNG Views:	1 Size:	50.5 KB ID:	1612941

        Long version: I have a "Create Bounding Volume around Selected" function, which creates a simple volume around selected actors' bounds. I had this in right-click Actor Actions but wanted to move this to Editor Utility Widget (trying to do this with a few things, since utility widget allows you to change the function options without bringing up a dialog every time, allows you to specify a default for e.g. class types & can be one-click).

        In my editor utility widget I'd like to allow them to pick the class of Volume they want to create. But currently, I can't find a way to either:

        a) Populate a combobox with all classes of volume, nor
        b) Convert a selected combobox string to a class, so that I can spawn the volume

        In this case, I guess I will manually populate an array with current volume classes and fill the combobox that way, and map those to strings so I can convert back from the combobox. It's just obviously not ideal since I'd have to keep that updated with volume classes (and other users of this tool may have their own classes that won't be in there), and I can't realistically do this if it's something with a lot of classes (like if I want to give them an Actor class dropdown).

        So, feature request for a) and b) above if possible
        Last edited by Spoondog; 04-27-2019, 08:33 PM.
        Dev Blog
        Twitter: @TheRealSpoonDog
        150 FREE Blueprint functions for your project

        Comment


          #34
          After watching the livestream I started experimenting with Utility Widgets and I am starting to face a few challenges.

          -How can I detect the right mouse button is down? So far only found an event to detect when the mouse clicks the widget, but I need to know if the mouse is pressed anywhere in the viewport.
          -I want to convert the mouse position from screen to world, but I can't without a player controller, get player controller returns null since it's in-editor, and get widget owning player also returns null, any workaround?
          -Set simulate physics does change the checkbox of simulate physics, but the object does not simulate physics when I hit play, I have to check and uncheck the object manually again for it to work.

          Having access to the mouse world location and click, I can start creating a brush and paint items in the scene.

          Hope you find this feedback useful, and thanks in advance for the help.

          Comment


            #35
            If you have Realtime turned off in the active viewport, Editor Utility Widget Tick only fires when you move your mouse. Also timers (SetTimer by event/function) don't seem to fire at all (but works fine with realtime turned on in the viewport).

            Also, I'm getting this error spam when running PIE:
            Code:
            LogEditorScripting: Error: The Editor is currently in a play mode.
            It's happening because I use some editor scripting nodes in the widget on Tick (I have a heartbeat event that checks every second if the world has changed, or if the selection has changed). I can't find a way to check if we're in play mode though, to avoid running those things.
            Last edited by Spoondog; 04-30-2019, 07:52 PM.
            Dev Blog
            Twitter: @TheRealSpoonDog
            150 FREE Blueprint functions for your project

            Comment


              #36
              Originally posted by Spoondog View Post
              I've had this error a few times since starting to play with the editor utility widget - not sure if its to do with the widget or just a 4.22 UMG thing, and I don't have a reliable repro yet but I'll leave this here:
              Code:
              LogOutputDevice: Error: === Handled ensure: ===
              LogOutputDevice: Error: Ensure condition failed: !IsGarbageCollecting() [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\UMG\Private\Slate\SObjectWidget.cpp] [Line: 43]
              LogOutputDevice: Error: SObjectWidget for 'Spoon_Tools_Rollout_C /Engine/Maps/Entry.Entry:Spoon_Tools_C_0.WidgetTree_0.Spoon_Tools_Rollout' destroyed while collecting garbage. This can lead to multiple GCs being required to cleanup the object. Possible causes might be,
              LogOutputDevice: Error: 1) ReleaseSlateResources not being implemented for the owner of this pointer.
              LogOutputDevice: Error: 2) You may just be holding onto some slate pointers on an actor that don't get reset until the actor is Garbage Collected. You should avoid doing this, and instead reset those references when the actor is Destroyed.
              I think I have a reliable repro for this now. If I change some values in my editor utility widget after starting the editor, then open my widget blueprint and compile, it will always give this error (like it's having trouble destroying something while it's open). My widget sets its own values on startup, so essentially the error will always happen on first compile.
              Dev Blog
              Twitter: @TheRealSpoonDog
              150 FREE Blueprint functions for your project

              Comment


                #37
                Originally posted by Night Watcher View Post
                After watching the livestream I started experimenting with Utility Widgets and I am starting to face a few challenges.

                -How can I detect the right mouse button is down? So far only found an event to detect when the mouse clicks the widget, but I need to know if the mouse is pressed anywhere in the viewport.
                -I want to convert the mouse position from screen to world, but I can't without a player controller, get player controller returns null since it's in-editor, and get widget owning player also returns null, any workaround?
                -Set simulate physics does change the checkbox of simulate physics, but the object does not simulate physics when I hit play, I have to check and uncheck the object manually again for it to work.

                Having access to the mouse world location and click, I can start creating a brush and paint items in the scene.

                Hope you find this feedback useful, and thanks in advance for the help.
                Did you have any luck with this?
                Website:http://www.NonLocalitySoftware.com
                Facebook: www.facebook.com/NonLocalitySoftware
                Twitter: https://twitter.com/NonLocality_Dev
                Instagram: @nonlocalitysoftware
                Discord: JBBym8F

                Comment


                  #38
                  Two things I run into are:

                  -Tabs are a global setting so if you create and add a Editor Widget Tab in Project A and then open Project B it will try to open the Editor Widget tab from Project A but fail and the tab will be an empty "unrecognized tag"... So I end up closing those but when I go back to Project A I need to reopen and setup the view like I want it again.

                  - Changing an Actors location etc thru Editor Widget dont mark the actor/map as dirty so no hint that the map has changed when you close or change map

                  Comment


                    #39
                    Hi,

                    I have released an editor only plugin to fix/add some of the missing features, like you can bind a bunch of Level Editor and Asset events, get the mouse position in the level editor etc.
                    Its something until Epic add proper support for this kinda stuff

                    For more info check out the thread, the github page or ElgSoft.com


                    Level Editor events that are exposed in the plugin are:
                    OnLevelActorAdded, OnLevelActorDeleted, OnLevelActorAttached, OnLevelActorDetached, OnActorMoved,
                    OnActorSelectionChanged, OnActorSelected, OnActorDeselected, OnWorldAdded, OnWorldDestroyed,
                    OnMapOpened, OnMapChanged, OnEditorModeChanged, OnEnterMode, OnExitMode, OnEditorCameraMoved,
                    OnFocusViewportOnActors, OnBeginPIE, OnPausePIE, OnResumePIE, OnEndPIE, OnBeginStandaloneLocalPlay,
                    OnLeftMouseClick, OnMiddleMouseClick, OnRightMouseClick, OnInputKey.

                    Asset events that are exposed are:
                    OnAssetCreated, OnAssetRemoved, OnAssetRenamed, OnAssetSelectionChanged, OnAssetSelected, OnAssetDeselected

                    Comment


                      #40
                      i want to request the following list
                      1.about material. i want to change material shading model use editor widget
                      2.get the specified texture in the material use editor widget

                      Comment


                        #41
                        So I know Lauren talked about adding more scopes during the live stream, and I wanted to request a scope that's jumped to the top of my list: UMG!

                        I'm building out a UI framework for my game to bring some sanity to my UMG workflow, and part of that was importing a custom color palette to help ensure consistent colors are used across my widgets. Creating a user-friendly way to pick from those colors in UMG has proved to be challenging. The color palette currently resides in a struct, and I've created an enumerator alongside that which allows me to add a dropdown to my widgets that I can pick a color from. This works, but there's no visual feedback since the dropdown doesn't have any swatches to preview each color.

                        This could easily be addressed with an editor utility widget, either with a color picker or a custom dropdown that shows swatches for each entry. But alas, they're only scoped to the level editor.

                        I would love to see UMG and other scopes added in the future!
                        Join Unreal Slackers, the largest Unreal Engine communuty on Discord! → https://unrealslackers.org
                        Have a question? Give me a shout on Twitter → https://twitter.com/heypfist

                        Comment


                          #42
                          Hello, and happy Monday!

                          I have gone through all the posts here so far, and tried to summarize a set of answers. If you feel like I didn't get to your question, please re-add it here.

                          - Access to more editor functions/editor specific events. These will come over time, and in the meantime, it looks like there's already awesome devs making plugins to expose more of that to Blueprints and Python!
                          - Editor UI styles. UMG is still really a game-first system, so this isn't something that will change soon, probably. I can say there will be easier ways to make properties like class dropdowns, etc. so you can have details panel-like sections in your editor utility widget.
                          - Saving variables! I agree, we just don't currently have a time for this scheduled, and it will take a bit of design for the official system. I have seen a number of UE4 devs get this working in different ways, though.
                          - Viewport overlays - this isn't currently planned, but we are overall focusing a lot on editor extensibility so I wouldn't rule it out down the line. Menus and toolbars fall into this area as well
                          - BUGS! Please report any crashes, etc. through the UE4 bug tracker. That's the best way to make sure they get tracked and on the schedule for fixing. That includes the unrecognized tab issue in a different project.
                          - We are also working on a system to get auto-registration running, so you won't need to run the UI once to get it to show up. This would also probably let you do a "run editor utility widget" so you could have one panel spawn another.
                          - Keybindings! This is actually one I haven't really sketched out a solution for, so I'll keep it on my list as something to keep in mind for future Editor Utility Widget updates. Same goes for getting mouse inputs, etc. Right now a lot of input is funneled through the currently focused widget, so this will take a bit of system planning.
                          - EditorUtilityComponent - keep an eye out here for updates soon
                          - Worlds and world contexts - keep in mind that in Editor Scripting Utilities plugin, there are functions for getting the editor world context and the game world context. This will probably help when you're in simulate or PIE, or need a world context for a node.
                          - Make sure to use transactions! I saw a few things about maps not dirtying, etc. If you begin and end the transaction, and add objects to the undo buffer, that should handle this case. Also, always good to be able to undo or redo things!
                          - Scopes! One day, I hope

                          Also, keep posting your UIs and tweeting them, it's so great seeing the work everyone is doing here!

                          Thanks!
                          Lauren

                          Comment


                            #43
                            Bit late to the party, but just wanted to add:

                            In past games I've usually made a system to save level stuff to DataTables that can then be easily referenced in game later (such as enemy positions, environmental lighting setups, etc). Only problem is that you then need to open the data table and manually click save for it to keep the changes.

                            Would be nice if there was a way to force assets to save, this way we could also use Editor Utility widgets as custom DataTable editors!
                            And also the big one, an asset selector so we can do much more than just simple level tweaks, as it's one of the few things that currently isn't possible to get past using widgets.

                            Also! In the preview I noticed there was a widget that functioned identically to the details panel categories, however it was very buggy and removed in a later preview. Crossing my fingers that it comes back, as being able to hide content (similar to categories) is incredible!

                            Comment


                              #44
                              Originally posted by Oldsiren View Post
                              Another suggestion would be for an eye dropper type of tool or widget for editor utility widgets incase we only need to select one actor in the level for something, or a specific type of actor.. that would be nice
                              I agree to this. Maybe am not understanding the public variables but it would be good to basically have public variables as in the details panel of an actor i.e. Actually making a customized details panel via Editor Utility Widget.

                              Comment


                                #45
                                Originally posted by Night Watcher View Post
                                After watching the livestream I started experimenting with Utility Widgets and I am starting to face a few challenges.

                                -How can I detect the right mouse button is down? So far only found an event to detect when the mouse clicks the widget, but I need to know if the mouse is pressed anywhere in the viewport.
                                -I want to convert the mouse position from screen to world, but I can't without a player controller, get player controller returns null since it's in-editor, and get widget owning player also returns null, any workaround?
                                -Set simulate physics does change the checkbox of simulate physics, but the object does not simulate physics when I hit play, I have to check and uncheck the object manually again for it to work.

                                Having access to the mouse world location and click, I can start creating a brush and paint items in the scene.

                                Hope you find this feedback useful, and thanks in advance for the help.



                                Hello "Night Watcher",

                                Not sure if this helps or if it only works in GamePlay but am refering to your "right mouse button".
                                Check my attached screenshot.
                                Basically in the override function "OnMouseButtonDown", in the widget it uses node "GetEffectingButton" key and compares it with the chosen key of the compare keys. If they're equal, right mouse button is pressed.
                                Attached Files
                                Last edited by Kidox18; 05-25-2019, 09:17 AM.

                                Comment

                                Working...
                                X