How to show/hide Widget

Hello my friends.

I’m having this problem and I don’t know exactly how to fix it. I want to script in the Level Blueprint so when I press Q I toggle to show/hide the Counter for the stuff you have collected. Also I have First Person Blueprint when I created this project.

Thanks if anyone helps.

-Seif.

You’re going to be working with nodes like:

Add to viewport

Set Visibility

Be sure to create the widget in a BeginPlay or somewhere that executes at the start

Hope this points in the right direction

1 Like

Hey man, I noticed that my original HUD widget was broken and didn’t work. But I got my new one to work perfectly with your tutorial also. Here is a photo of it.

2 Likes

Man, you don’t want to remove from parent every time. Just set visibility instead…

This is how to toggle visibility of a widget

1 Like