Cast to - a widget help

There is no such node to get a cast for a widget in UE. Here is a widget setup on the Player Controller, inside a function called CreateHUD. However, technically it is just a widget blueprint, not a HUD blueprint - used usually to help initialize the current game mode.


Notice the widget blueprint variable called HUDReference. Each time I want to access something from my widget user interface layout I make a cast to the player controller, get the HUDReference variable, then have full access to my widget.

Alternatively you can also add for instance a blueprint to your player character, which contains a widget blueprint, and call that through a cast to your player character, then getting that blueprint. Said blueprint then contains a widget blueprint which could be toggled via an input button.

Notice below the attached Blueprint called Skillbook, and the InputAction event to call the function ToggleSkillBook, attached to the Player Character.

On that called blueprint the Toggle widget blueprint function, changing the visibility of the widgets main panel, to toggle visibility.