I’m not sure this is the exact answer you want, but place the static mesh inside a blueprint. then in the blueprints construction script you can create a dynamic material instance that then allows you to control the material.
Then you can use the button to spawn from actor class that blueprint and set the material you want