How to toggle emissive material through ui widget?

Hi all, I’ve currently got my UI widget to toggle visibility of spotlights on actors through on ‘clicked button’. I have added planes above each actor as a use of a icon on a screen capture map.
I wanted to know how I’d toggle an emissive material on the same clicked button?
This is what i have already:

And here is a clip of what it shows:

Never Mind. I solved it myself. I added a flipflop connected to a Set material function node, which i set it to an emissive material. Then linked another set material into the B and added the non-emissive material.