How to Disable a button in UMG Permantly?

I understand that I need to use a boolean. So the question is, how do I make it so that if a button is clicked, it can never be clicked again. Tried using the “Set is Enabled” and targeted the button, and it disables it. But once I leave the widget, it comes back to normal. Any ideas? I’m sure its an easy fix. Thanks!

do you create a new widget or do you set the enable back to true somewhere, i’m pretty sure one you set it to disabled and unfocus, it’s still disabled unless you remove it from the viewport and create a new one, or re-enable it somewhere

I am creating the widget and removing it. Do I need to do it a different way?

Well if you create a new widget for this you will need to pass down that variable.

You can’t just do it in your widget itself as every new instance is a completely new one 100% independent from any other widget from that type.

So you will have to save it maybe in the player character or controller. The game or player state might be the right thing too… It really depends what exactly that button does.

Anyway once saved outside of the widget it will continue to use the same variable and therefore disable the button for good once it’s disabled in one instance of your widget.

I hope this helps.

Cheers

I’m still having trouble with this. Any tips? I can disable it all day long, but I can not get it to disable and enable once clicked.