Why after hide/unhide UI button, you need to click twice to work?

I have widget with canvas panel in which there is a button.
After clicking the button i set the visibility to hidden.
In certain moment it’s visible again, but sometimes nothing happens on first click.
Please help.


Do i have to create more widgets as splitting my main HUD and then Add to Viewport / Remove from Parent separately every widget when needed(in my case just a button for a widget), and then will the buttons work every time?
Is this the only right way to be done?
And if so, is hide/unhide method works fine only if you don’t have any activity on the widget, like buttons?

Hi I have the same problem did u resolve it ? thx

I just replaced " hidden " by " hit test invisible " and it works !!!

1 Like

Hi, i ma glad you solved it. In my case i needed to hide the button after you press it, so to work properly, i just use OnClicked Event instead of OnPressed :).

1 Like