First of all Setting Visibility on tick? Bad J0ker! Set them when you need them to show → Your Anvil activated Event or whatever Event occours that should show up UI. Same for Hidding.
What happens on on Then0? Any other places you do anything with your UI´s? Try unconecting a couple Nodes and See if something changed. Not enough info to Debug here.
A couple of days ago I made a crafting system. When you interact with an anvil, a widget pops up. It contains a few buttons, but they don’t quite work. Basically I click on them and nothing happens. I have to spam-click on them until they finally register a click. I thought it was because I have a text component over the button, but I deleted it and still it doesn’t work. I ignored it, because I justcouldn’t fix it.
Now I’m trying to make a console. So I have a widget with a textbox component, but this doesn’t work either. It seems like it gains focus for like an attosecond, but then it loses it.
I tried to use Set Input Mode to UI in my HUD BP, but it still doesn’t work…
The way I did the console and the crafting UI is pretty simple. I have a main widget, which normally just displays the player’s health and a couple of other things and then inside of it a have the console and the crafting widgets both as components. Normally they’re hidden, but when a player interacts with an anvil, or activates the console, I set their visibility to Visible.
I’m pulling my hair out over this for so long and I just can’t find an answer.
Here’s my main widget’s graph:
Hmmm… How exactly can I set the visibility on event? I could add a custom event, but how can I call it from the player’s C++ class?
On Then 0 I do a cast to the player class and setting a slider component’s value to player’s health / 100 and few other text components’ values to variables from the player class. The “Is Crafting” and “Console” booleans also come from this cast node.