Download

Remove From Parent does not work on a user created widget

I have a template widget I’m using to easily manage different windows

The template has a single button on it, the close button which I have selected below.

templateexample.png

This is my event for the close button

ce0e3fc5c059a3947e56b686286558f65b863847.png

I even tried calling ‘Get Parent’ and then remove from the parent as well. Still no effect

It works when I just create the template widget in game.

But when I make a new widget and add this template widget, I can’t get it to actually remove itself. I stepped through and it’s actually hitting the ‘Remove from Parent’.

What can I do?

I think ive had a similar problem to you. My menu system uses child widgets for the buttons, one of these is “play”. Clicking on play opens another level which is called inside the child widget, but removing the whole menu fails using like what you have above.

My salvation was using Get All Widgets Of Class and a for each loop. This way I could kill all the widgets once the level changed.

4e2427e811bfce0bd16ae7c192d41f88d5e45893.png

Hopefully this might help you

I was wondering about that too,

in the end i did it the other way around and call Remove Child inside the Parent which worked out just fine.

However i have a constant HUDWidget, so i can do whatever i like to its children, because it has all Menus(and menu has submenus stored) and Static HUD Elements.