How To Set Widget As HUD

Hi, I was wondering how I can set my widget as a HUD. All I did to create the widget was call a “Create Widget” inside my player controller and then a “Add to Viewport” node to display it. There is nothing special about my widget, it just has a canvas panel with a progress bar in it.

I was using a Level Sequence and checked “Hide HUD,” but it doesn’t work. The widget still appears and I believe it has something to do with my widget not being a HUD. So I was wondering if anyone knows how to set a normal widget as a HUD so the Level Sequence will hide it when it plays. Thanks!

The HUD is a special class and not a UserWidget.

to hide your Widget HUD, you need to store the reference of the createWidget (the blue output pin) as a variable.
by getting that Variable, you can use SetVisibility to show or hide it.

i use UserWidgets for the HUD of the player, too. The AHUD class, for me, is only used for drawing marquee selection rects or debug texts.

1 Like