Changing detail map at runtime

Hi!

I want to change the detail map of the standard shader at runtime. I use the following line:

renderer.material.SetTexture("_DetailAlbedoMap", detailMap);

But I can see the changes only when I unfold the material in the inspector of the object. Is this a bug or did I something wrong?

Thanks for your help.

Best regards,
David

You need to enable the keyword for detail maps: