How to change the material of a static object at runtime

Hi,
I know, this is a topic that has been largely covered, but what I want to achieve seems to be a bit rare. So I want to change the material of a static, lghtmaped object with a hub button. I found the way to do it with the object when he is not lighthmapped, but as soon as I build the lighting UE display the default material when I hit the button. That’s for a html5 project. Any Ideas ?

Cheers !!