UMG: Set visibilty on text doesn't work at runtime

I’m trying to hide/unhide a textblock but I’m having little luck. I’ve attached an image which shows my setup, the variable VisVar prints correctly as do all the other prints telling me they communicate correctly.

I’ve seen other posts about this but am posting here as it was recommended to start a specific thread.

I’ve also tried to put my variable right in the visibility slot with no luck.

Am I doing something wrong?

Thanks!

Hello ,

After looking through your blueprints I didn’t see where you actually set the visibility. I see that you changed the variable but it seems you have yet to apply the change to the visibility setting of the text block.

Here is a simple example of a setup that I used. The example toggles the Visibility of a text block every time a certain button is pressed. After setting the visibility variable I connect it into a “set visibility” node. I believe this is the node that is missing in your blueprints. I hope this helps.

Make it a great day

I’ve seen this same bug - visibility (and other) bindings were apparently broken in 4.5.

Thanks for looking into this Rudy,

So just setting the variable and then setting my textblock to use that ‘visvar’ variable won’t work? It seems odd that you can use the behaviour/visibility pulldown for the textblock to use that variable if so.

That’s also why I tried both ways, setting the ‘visvar’ inside a function instead, both options being shown in my image above.

Anyhow - how did you get the text block reference variable (Text Block 259)? I can’t figure that part out from my already existing (vs a runtime created one, which I don’t even know if it’s possible to create one at runtime) textblock.

I assumed that function was for vis switching full widgets, as in an entire widget. Looks like I was wrong. :slight_smile:

Thanks again.

Thanks for the headsup! Maybe there’s still a way to do it (See Rudy’s reply below)… I’ll post here if I can work around what might at best be a change of vis functionality. What I’m doing seems logical however so we’ll see. I prefer as few odd ‘gotchas’ as possible in Unreal. :slight_smile:

Hello ,

I am happy I could help. As for being able to use the textblock as a variable in your widget graph, you will need to check the “is Variable” check box in the detail panel.

As shown here:

I hope this helps

Make it a great day

Great! That works perfectly fine!

I’d still like to point out this seems like one of those gotchas that’ll catch a lot of new users as I don’t see a logical reason why my first attempt didn’t work.

Thanks again anyway!

Hello R-Camaro,

I believe that this is a separate issue than what was described in the original post for this thread. I will need you to create a new thread for tracking purposes. Could you create a new thread and post a link in a reply here so that someone can follow up?

Just remind you guys. You can’t change visibility of 3D widget components. Change opacity instead.