How to Cast To a UMG Widget from a BP Component?

I’m trying to “Cast To” a UMG Widget from a Blueprintable Component and I thought “Get User Widget Object” would work but I still need a Target and I don’t know what to put to the target? Any Help?

This is in my Blueprintable Scene Component.

I never used that node so I don’t know how it works. I would use “Get all Widgets of Class” with “Only Top-Level” enabled followed by either a get node (if there is only one) or a “For Each Loop”.

Hope that helps!

So this blueprint pictures is inside a WidgetComponent? Then “Self” will be the widget in which this is called.

If you are calling this somewhere else, you will need to ge the WidgetComponent first. For example if you have one on your character, you would need to get your character, cast it to your char class and then get the component to plug it into the Target. But that is just an example.

It would be helpful to see where your Component is, to know where exactly you are calling this picture and what you want to do in general (:

I know what I did wrong now. I needed to “Add Widget Component” first before “Cast To”. I thought I did added it but I just had to go over my BP inch by inch. Thanks for the help.

i have same issue let us know if fix ur problem and how

I added the widget first so I could Cast To it. If you need a screen shot I can give it.

yes plz
thank you

Maybe this could be done another way, but this is how I did it. I hope this make sense.

1.Add the Widget Component in your Gamemode Blueprint. Make sure to click on the “Add Widget Component” Node and select the Widget Class you want in the details panel.

2.Then in your Blueprintable Component, “Cast To” your Gamemode to get the “Add Widget Component” reference.
After that, Use the reference to “Cast To” your UMG Widget.

thank you very much