Accessing a Static Bool Param in a material from a Level BP

Hi Guys

I’m trying to access a static bool param I specified in a material (I want to trigger this boolean from the BP)

I have access to the static mesh which holds the mateiral, but don’t know how to access the “static bool param” specifically:

level_bp_1.jpg

What’s the correct way of doing this?

Cheers,
Michael

1: From Event Play, plug to Create Material Instance Dynamic.
2: Connect your Get Material to Create Material Instance Dynamic.
3: Drag a wire from Return of Material Instance Dynamic.
4: Search for Get Bool in which you can specify the parameter name.

You should now be good to go. :slight_smile:

Thanks :slight_smile:

Hmm, I suppose you mean something like this:

fd85e74762fea73d90277c39fff6a0cd8729fa1e.jpeg

I have defined a variable in my material called “tv_switch” which I’d like to access, but so far I dont seem to get access to it…

Cheers,
Michael

Michael, did you find an answer to this question?

I read from the documentation that static switches (where these bools are presumably used in the material) are a compile-time thing so I was wondering if that explains why these parameters aren’t exposed via blueprints. Then again, you have both ‘Static Bool’ and ‘Static Bool Parameter’ so maybe that applies to only the former node and this is just an oversight? I’ll have to check if these are accessible via C++.

For now I ended up using a scalar parameter and multiplying it with the relevant nodes instead.

PS: just realized I’ve bumped two of your old threads that seem related to item highlighting in one way or another. Sounds like I’m looking at the same stuff that you were 5 months ago!

this is just ludicrous, why bools cannot be accessed ?

branches (if) do exist in GLSL language