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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How I Set Boolean Material Parameter in BluePrint ?

Hi, How i set a variable of type boolean via BluePrint ???

In Blue Print not Show Set Boolean Parameter Value property..

Only Vector, Texture and Scalar Parameter.....

Product Version: Not Selected
more ▼

asked Aug 11 '14 at 12:55 AM in Blueprint Scripting

avatar image

101 11 22 32

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

A workaround is to use a scalar parameter and an IF node and a fixed scalar 0. A is your scalar parameter, B is 0 and then you can switch between three different inputs. Really useful to toggle on and off a feature of a material at runtime.

more ▼

answered Oct 04 '17 at 08:02 PM

avatar image

26 2 5

(comments are locked)
10|2000 characters needed characters left

Short Answer: You can't.


"This parameter is named static because it cannot change at runtime, it can only be set in the Material Instance Editor. Static Switches are applied at compile time, not at runtime. This means that whatever branch of the material was dropped will never be executed, so static switches are effectively free at runtime. On the other hand, a new version of the material must be compiled out for every used combination of static parameters in a material, which can lead to a shader explosion if abused. Try to minimize the number of static parameters in the material and the number of permutations of those static parameters that are actually used."

Silly, right? I mean, in my custom shaders I can set a boolean value without any problems. This would be a nice feature capability to have in UE4.

more ▼

answered Mar 04 '15 at 12:17 AM

avatar image

819 49 29 73

avatar image Feanix Apr 21 '16 at 04:02 PM

It's not silly. "In Editor" is not the same as "In Runtime". Runtime also applies the game once it's cooked and packaged and running a PC as a finished product. At that time, shaders are compiled and not more switch can take place. At the point it would be impossible to have a blueprint change the switch value.

(comments are locked)
10|2000 characters needed characters left

Try the Scalar one. Boolean is a scalar type.

more ▼

answered Aug 11 '14 at 04:09 AM

avatar image

3.4k 154 51 271

avatar image Vaheva Apr 07 '18 at 03:37 PM

All negative votes reveals voters ignorance

(comments are locked)
10|2000 characters needed characters left
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