Announcement

Collapse
No announcement yet.

UMG widget On Remove event

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

    UMG widget On Remove event

    Hey all, I can't seem to find an event that is called when a widget is removed by it's parent, so if a widget requires any clean up I have to call this manually whenever I call Widget->Remove from Parent. Does anyone have a way of executing a graph when a widget is removed?
    Journeyman's Minimap - Available on Marketplace - Forum topic - Video

    #2
    What do you mean "executing a graph when a widget is removed?"

    Comment


      #3
      What I mean is I want a blueprint entry point for when the widget is removed from the parent, like an event or a delegate. I can't find something like that and I was wondering if I was missing something.

      Actors for example have a Event BeginPlay and Event EndPlay. Widgets have the Event Construct which is similar to BeginPlay, but no corresponding one for when it's lifetime ends.
      Journeyman's Minimap - Available on Marketplace - Forum topic - Video

      Comment


        #4
        I would be interested in having such a feature for this as well. I hope widgets get this functionality soon, because it would make unbinding an event dispatcher for me much easier to do.
        Lastest Developed Games
        Online Portfolio

        Comment


          #5
          You mean removing the widget from the viewport?

          Comment


            #6
            Originally posted by Snow901 View Post
            I would be interested in having such a feature for this as well. I hope widgets get this functionality soon, because it would make unbinding an event dispatcher for me much easier to do.
            That is exactly the issue I'm struggling with. Widgets having no easy "OnAdd/OnRemove" event pair makes it difficult to make sure everything is cleared up after the widget is no longer in use. Event dispatchers as well in my case.
            Journeyman's Minimap - Available on Marketplace - Forum topic - Video

            Comment


              #7
              Hi there! Maby that`s thread is too old, but I`m live an answer here Widgets has Event Construct and Event Destruct so that`s pretty same as OnBeginPlay and OnEndPlay. So maybe, that`s a solution

              Comment


                #8
                Originally posted by Andrey_Ryzhov View Post
                Hi there! Maby that`s thread is too old, but I`m live an answer here Widgets has Event Construct and Event Destruct so that`s pretty same as OnBeginPlay and OnEndPlay. So maybe, that`s a solution
                You can't rely on that, you don't know when the garbage collector will be called so it's not the same a native removed from viewport event would be.

                Comment

                Working...
                X