Doesn't Material(Shader).EnableKeywords(DisableKeywords) work on mobile?

I am using shader_feature keywords to control the outline pass of a character shader.It works perfect on PC.But when building it to Android APK,this feature doesn’t work at runtime,as I switch this keyword,the material or shader doesn’t change.

Anyone know why?

Did you include all the shader various in the build?

I know this is an old question, but make sure your shader specifies #pragma multi_compile and not #pragma shader_feature.

When you don’t have multi_compile specified, your build will only compile and include the shader variants on in-use materials, and the default shader setting.

1 Like