I need to cast to a HUD from another HUD

So, basically Im making an Android game in Unreal with Blueprints (Im new to all of this), and I made a “Main Menu” that you have to check boxes to select which item you are getting in the level, I made a HUD to select the Items, and im making Another HUD to make all the functions (
turn on/off flashlight etc) so in the image below im showing you what I thought, when the HUD (gameplay) appear, he will cast to the hud that I check (select) If I want the UVFlashLight, and in THIS HUD he will show or not if I checked… (sorry im bad at explanation and English…)

Which blueprint actor is responsible for creating those widgets?


cast to

Is not a method for obtaining a reference / finding objects. In order to cast you need to know where your objects are. Once you do, chances are casting is redundant.

So, My “BP_Character” is creating and adding to viewport the huds, I just dont understand how can I create a HUD for the “intro and select items” then creating a HUD for “show the items selected buttons”… I was thinking and one way was to creating all of this in just ONE HUD Blueprint… But, if u know another way for creating in separate huds i would appreciate it :slight_smile:

You can create and add as many widgets to the viewport as you want. You could also have one master widget and add user widgets to that. Can be done at design time or run-time.

How can I create a Master widget???

The same way you create any other widget. You can then dynamically create and add new widgets to its canvas or add them by hand in the Designer. You sure you wouldn’t rather watch an introductory tutorial on UMG? Would save you a lot of time asking questions.

So in that case, u are telling me that I can create just ONE widget, and in just THAT widget I create the “intro and select items” and the MAIN HUD that shows the buttons?? I thought about that, I guess its the way… Thanks

Yup. It’s a pretty standard way of working. You do not even need to create additional widgets:

“intro and select items”

You can simply add user widgets in the designer to the master widget. It also trivialises communication between subwidgets, especially once you wrap you head around Event Dispatchers, which are made for this.

OKAYY THANK YOUUU!!!