Download

Setting StaticSwitch parameter

So, the question is, is it possible to set StaticSwitch Param in MatInstance from Blueprints? It seems, that there are no such node, only Scalar, Vector and Texture. How about Switch?

I know I can replace switch with lerp and then select Alpha float with boolean, but sometimes I need to use mat instance it self without blueprints and its a bit messy to use without switches.

Hey there, I spent some time trying to get this working from blueprints as well, only to find they can only be modified in a MaterialInstance not a DynamicMaterialInstance. The reason for this is the material needs to be re-compiled every time the switch value is changed.

For now the Lerp with float to bool is really the only way to do this currently, unfortunately this causes the material complexity to be a lot higher. With a StaticSwitch or a regular switch with a StaticBool it will turn off a section of code to reduce the material complexity, but with a Lerp it will cause it use the full network, increasing the complexity.

Hopefully this will be changed in a future release, but for now there is no other option unfortunately.