x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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:

alt text


alt text

Product Version: UE 4.18
Tags:
boolfalse.jpg (124.2 kB)
booltrue.jpg (133.3 kB)
more ▼

asked Dec 17 '17 at 04:55 PM in Blueprint Scripting

avatar image

marvelmaster
41 2 7 10

avatar image SouthBot Dec 18 '17 at 10:11 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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

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


more ▼

answered Dec 17 '17 at 05:58 PM

avatar image

Jin_VE
4.4k 32 77 42

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Dec 18 '17 at 06:24 AM

avatar image

marvelmaster
41 2 7 10

avatar image Jin_VE Dec 18 '17 at 06:58 AM

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.

avatar image marvelmaster Dec 18 '17 at 09:27 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question