What is the proper way to create and destroy UMG widgets?
Hello, to create UMG widgets i use Create Widget and then add to viewport, should i create it only once and then just toggle visibility or it's fine creating the widget everytime? There is no Destroy Widget, so i assume Remove from Viewport destroys the widget or at least removes it's reference for late destruction, but what about it's children? Do i need to clear them before removing from the viewport, or he will do that automatically when he's removed from the viewport? Thank you
asked Oct 19 '14 at 11:20 PM in Using UE4
When a widget is removed from parent or removed from viewport it stays in memory. A new widget is not created beyond the initial creation, it is simply added to the viewport. There are a couple of important things to note.
I hope that this answers the questions that you had.
Make it a great day
answered Dec 23 '14 at 09:26 PM
Rudy Q ♦♦ STAFF
Don't forget to invalidate any timers going in the widget, otherwise GC won't destroy it.
answered Feb 05 '19 at 11:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here