Change variable visibility at run time on a blueprint?

Seudocode example:

if(color_curve)
    hide(color_var)
else
    show(color_var)

Any way to do this?

There is a SetVisibilty node. What, you need to target your the component though, with a checkbox it will propagate to the children. So if you want to set it on everything, Get the RootComponenet of your blueprint, and check the propaget box.

Thanks for response.
This visibility is for the render. I refer to editor variable visibility (the eye button for show the blueprint var in the editor).

AFAIK you can’t. Why would you want to change it tho? What is it that you are trying to do?

That’s not visibility, that is making the variable private or .

The use I can see for this is like a Property, with a custom Getter and Setter. What you should do is make your variable private, then make either make a function that will return a reference to it, or Getter and Setter functions for it. Then you could make a private variable named something like lockYourVariableName. Inside your functions you could check to see if the lock bool is set to true, if so not do anything, and if false either set the variable or return it, etc.

Something like that is like a Property in C#. I don’t know if there is a built in way to do it in Blueprints, but making your variable private, then exposing through functions is one solution.