Normalmap not applied until expanding shader in inspector?

Title describes it well, but I’m applying a normalmap via a script (at runtime). The normalmap itself doesn’t get applied until I expand the shader.


The colormap/diffused gets applied the same way and works fine, help me solve this :).

You must enable the Standard Shader variant by using the EnableKeyword function. A different variant would be required if you start using a shader feature that was not initially in use by the material.

The specific Keywords required to enable the Standard Shader features are as follows:

_NORMALMAP (Normal Mapping)
_ALPHATEST_ON (“Cut out” Transparency Rendering Mode)
_ALPHABLEND_ON (“Fade” Transparency Rendering Mode)
_ALPHAPREMULTIPLY_ON (“Transparent” Transparency Rendering Mode)
_EMISSION (Emission Colour or Emission Mapping)
_PARALLAXMAP (Height Mapping)
_DETAIL_MULX2 (Secondary “Detail” Maps (Albedo & Normal Map)
_METALLICGLOSSMAP (Metallic/Smoothness Mapping in Metallic Workflow)
_SPECCGLOSSMAP (Specular/Smoothness Mapping in Specular Workflow)