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.
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.
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:
and the logic is on the widget blueprint (a little bit messy).