I have created a widget for a character made in blueprints. What is the object when I cast from the character blueprint?

116718-cast+widget.png

The Player Controler (at least that works for me), because you can have multiple characters with the W_PlayerMainHUD open, but you need to address the correct one

Your widget needs to be “spawned” and the object is what you pass to the cast.

Since you’ve already made W_PlayerMainHUD, in your PlayerController spawn it with the “Create Widget” function. Add the created widget to the viewport, then you can cast that object to your W_PlayerMainHUD (though at that point it’s no longer required, since the object automatically is of type W_PlayerMainHUD).

The Documentation has everything you need to know about widget manipulation.

Thanks but I’ve already spawned it in.

Doesn’t work.

If you have spawned it, then you attach the reference to the cast, I fail to see the problem.

It usually goes to GetPlayerCharacter. What are you casting to the HUD to execute?