How do i cast to a widget blueprints?

Hello guys so i have this simple problem I’m new to unreal engine
And i created some logic in a widget as a UI and stuff abd i want to cast
To that bp widget form the player blueprint but idk what do i have to put in the
Object is there a node for it ? Cuz this really hurts my brain

Hi Kalo,

Good question, assuming that you only have one UI Widget actor, you could ‘get all widgets of that class’ and set a reference to it on Begin Play.

Then you’d have easy access to grabbing variables from it.

Let me know if anything is unclear!


So let me see to make it clear this get all widget of class node is like casting but for widget and without having to use object right?. then i chose the blueprint i wanna get things from in the get all Widgets of class, then get all actors in array or something right then promote it to a variable so i can use it as a reference for the items i wanna call and use in the player blueprint right

create your widget from gamemode and then put in a variable inside gamemode like


then from your actor you can access gamemode and then your widget.
No need to cast it.




Thank you I’ll try it

1 Like