UWidget::RemoveFromParent() called on
‘/Engine/Transient.UnrealEdEngine_0:Hive_game_instance_C_121.notyet_dialogue_widget_C_1.WidgetTree_0.keyword_panel_widget_C_1’
which has no UMG parent (if it was
added directly to a native Slate
widget via TakeWidget() then it must
be removed explicitly rather than via
RemoveFromParent())
This message shows up and i cant remove widgets using Remove from parent or Remove all widgets. Can anyone explain what this message implies?
Same problem in 5.4. Did a lot of head scratching on this one since I spawn it in the normal way via blueprints BUT my widget is 100% C++ except for the visual stuff and everything thus happens in C++, including the remove from parent call.
In my case, I had the root of my Widget as a variable and called MyRoot->RemoveFromParent() and that didn’t work so I looked at the part of the error that speaks of the UMG parent and thought to myself “Let’s try something” and so I replaced that line with this (literally)
this->RemoveFromParent();
…and that worked perfectly! Yeay!
…and then I realized the “this->” is probably pointless also. Could just call RemoveFromParent directly and job done.
I think the problem in my case was that I created a variable pointing to the root ELEMENT inside my widget and called THAT to remove itself from the parent. I didn’t actually call my WIDGET and tell IT to remove itself from parent.