apply normal map (only) to objects

Hi there, hope you’re all doing well.

I have some normal maps that I want to add to different objects in the scene (cube, cylinders, and planes), which I will control using the albedo colour (so I’m applying the map and I will change the colour of the material). I don’t want to use any other textures with it.

I managed to apply it through code but when I run Unity I can’t actually see the material reflected in the objects, only the colours. But when I click on the object (or its material) suddenly it gets visible. Any way to overcome this?

P.S. I’m using hdrp

Stay safe!

Solved, sorry.

obj.GetComponent().material.EnableKeyword(“_NORMALMAP”);
obj.GetComponent().material.EnableKeyword(“_NORMALMAP_TANGENT_SPACE”);