Event Dispachers between non character blueprints

Hi guys, i have a big problem with event dispatchers, the ploblem is that i don’t know how to cast the level blueprint into a UI widget to call the event. I tried with casting but nothing works.
And the other problem is that i can’t use a variable form the UI widget to another blueprint, just to make some braches (if else) with it.

Thanks beforehand!

You cannot cast a level blueprint into a UI widget - this makes little sense, I’m afraid.

Could you explain the following:

What do you need to access and where? - Do you need to access a Widget in the Level Blueprint?


If that’s the case you can simply create the widget in the LevelBlueprint. Don’t forget to store a reference.

Alternatively, create the widget in one of the easily reachable classes, like Game Mode, Game Instance or Player Controller - these are accessible through a cast from anywhere in the game. That’s providing you took care of extending them.

Thanks for the answer! I’m making an architecture app in VR with oculus. I have the input and the events in the Player, the events logic are inside each menu (2 menus) and the logic changing all the materials and object selection in the level blueprint. But every time i try to use a variable form the UI widget the values is 0 and never change. Today i can’t make any screenshots but tomorrow if you want i will make some. I have to tell you that i’m a little bit new with the blueprints and i’m a little lost too, so sorry if i’m a little bit slow with these things.

Here’s a quick & dirty example demonstrating how to use a widget created in the Player Character to affect something in the LevelBlueprint:

Create a widget with a reference:

In the LevelBlueprint, cast to character and bind the button to an event in the Level:

Hi, good morning sorry for the late answer. Here it is what i made:
This is one part o the menu, the menu have to rotate each time i push an arrow, left or right, or change the menu with up and down:

241081-screenshot-3.jpg

241059-screenshot-1.jpg

and the logic is on the widget blueprint (a little bit messy).

.
The input is in the player blueprint:

For this communication i used the event dispatchers.

But when i try to access the variable in the player blueprint from the widget blueprint:

241083-screenshot-5.jpg

it allways shows 0 “like the default value” and the variable is changing in the widget blueprint but never changes in the player.

Sorry if explained it bad but please i will apreciate your help.