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.
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.
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.
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.
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.
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.
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?