# grey out public variable?

**URL:** <https://forums.unrealengine.com/t/grey-out-public-variable/412482>\
**Category:** Editor Scripting\
**Tags:** Variable, unreal-engine, editor, UE4, question, Blueprint\
**Created:** [December 17, 2017, 4:55pm UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482 "2017-12-17T16:55:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvelmaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@marvelmaster](https://forums.unrealengine.com/u/marvelmaster)\
**Post date:** [December 17, 2017, 4:55pm UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/1 "2017-12-17T16:55:43Z")

</div>

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:

 ![224144-boolfalse.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/6/e360451ed4a8bdc642824425ce7971e00b2c101c.jpeg)

* * *

 ![224145-booltrue.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/2/e028d1738377ca82a990b85f9c6267c58fa4272a.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [December 17, 2017, 5:58pm UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/2 "2017-12-17T17:58:01Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![marvelmaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@marvelmaster](https://forums.unrealengine.com/u/marvelmaster)\
**Post date:** [December 18, 2017, 6:24am UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/3 "2017-12-18T06:24:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [December 18, 2017, 6:58am UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/4 "2017-12-18T06:58:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marvelmaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@marvelmaster](https://forums.unrealengine.com/u/marvelmaster)\
**Post date:** [December 18, 2017, 9:27am UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/5 "2017-12-18T09:27:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SouthB2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SouthB2](https://forums.unrealengine.com/u/SouthB2)\
**Post date:** [December 18, 2017, 10:11am UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/6 "2017-12-18T10:11:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GOZARS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GOZARS](https://forums.unrealengine.com/u/GOZARS)\
**Post date:** [November 16, 2022, 2:04am UTC](https://forums.unrealengine.com/t/grey-out-public-variable/412482/7 "2022-11-16T02:04:04Z")

</div>

> [@SouthB2](#):
>
> “Advanced Display” checkbox on the variable

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?
