Hot widget on widget action

Ok, so I’ve made a widget called MainDisplay to be my outline and container for all my HUD widgets.

Trying to keep it modular, I’ve created widgets to put inside the bars and borders of the MainDisplay widget.

In the MainDisplay I have a widget switcher that worked before I moved the buttons to a separate widget and then added the sub-widget to the main one.

Now, I’ve tried to communicate the sub-widget with the buttons to the main widget with no success.

Every single tutorial on direct communication uses the player character or controller, but I should be able to use the get parent and cast to go up one level but nothing works.

Pls hlp.

Get Parent gets you precisely what it says - a direct parent. If you put a User Widget in a Horizontal Box that’s what you’re going to get when you fetch the User Widget’s parent - a Horizontal Box. It will not travel automagically all the way to the root of the widget and return that.

If you want a User Widget to talk to its owner, use Event Dispatchers.

  • the child:

  • the parent:

Whenever the child dispatches a call, the parent can catch it.

There’s no need to reference or cast in a scenario like this.