grey out public variable?

Hello.

I want to use a bool to activate a feature !and its public variables! on my blueprint.
Unfortunately I need to grey out the public variables once the bool goes to false…

Is there any possibility to do this?
I know it must be because for example the light source has this implemented somehow…
for further exlanation look at the pics please:


In this example, bMyOtherVariable will be grayed-out when bMyVariable is false.

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "MyActor", meta = (EditCondition = "bMyVariable"))
bool bMyOtherVariable;

Hm i suppose this is c++ i have never used it…so this is the only solution?

Yeah that’s the only way to do it. But it’s not the end of the world that the variables aren’t disabled. It’s a “wouldn’t it be nice” feature and those aren’t high on the list of priorities.

You can use a good comment and make sure to ignore things appropriately in your logic.

To do it at all you need to implement a C++ base class for your blueprint and declare the variables in there. I should warn you that in addition to a lot of learning, you will also be faced with a lot of compiling, so back things up before trying it out. You may not dig it. I find it worth the time/effort though and ultimately that’s where all the magic happens. If you’re serious about development in general, you’ll have to learn C++ eventually.

Whatever you decide, I wish you luck in fulfilling it.

Last time i enabled c++ in my project, it broke.
So I better go with a tooltip although its not the best solution.
Thx anyway

You could check the “Advanced Display” checkbox on the variable. It will then be hidden in the actors detail list. Not really what you want but might help

I see the option in the details panel, but how do you call/access “Advanced Display” on any variable action, so I can set this in blueprint?