Calling UI

I want to target a Widget menu object inside a diffrent Blueprint. How do a take a object from a diffrent blueprint inside another one?

There is no one answer to your question. There are too many ways to do it to list here. How to do it depends on the bigger picture.

Please explain fruther:

  • what is the relation between the widget and the actor?
  • where, when and by which actor is the widget created?
  • how is the actor instantiated? Spawned from Class? Placed in the level? An offspring of a child actor component?
  • will there always be only 1 actor and 1 widget?

The widget is a option menu inside of the pause menu. When te option menu closes I want keyboard focus to be back at the pause menu. I managed to make it work inside a diffrent menu, which does have a variable for the pause menu, so that was easy to target.

So when you said blueprint above, you actually meant another widget blueprint, correct?

yes

So, in short:

The widget is a option menu inside of the pause menu.

We pause the game, a menu pops up, we click options. When options is dismissed we want to be back in the pause menu? How close am I?

We don’t know how you organized the widgets. Are you creating a new Options widget? Are you using a widget switcher perhaps? Or the Options menus is already a part of the Pause menu? It’s hard to tell from the incomplete pic. I am assuming it’s the visibility thing.


If so, I’d then use an Event Dispatcher communicating this closing action from Options → Pause. Fire the dispatcher in the Options (that hides the widget, right?) and the Pause can receive that call and set the keyboard focus to self.

edit: perhaps dispatching a basic click back to the parent is enough. Which could look like this, providing that you click a button to dismiss Options:


To automagically create and assign a dispatcher to a custom event:

Essentially, this allows you to execute an action in another widget (or actor). And you can still use that click inside the original blueprint as it was. Think of it as of an additional action the button now performs.

your right. But when its back at the menu it doesnt have te keyboard focus anymore, which is needed for the controller navigation. The pause menu has been made inside the HUD widget blueprint. The option menu has been made seperatly in its own widget blueprint. And I want to mention the pause menu from the HUD widget bp in the option widget bp.

Perfect, see above.