Then get a reference to object under the mouse cursor. Do this in a player controller:
. In buttons click event get cast the first pc to your own and call BlueprintCallable function(or just bp function) that will actually change material.