Download

Turning on/off materials on lots of lights

Hi

I have a blueprint setup to switch on and off ceiling spot lights using a trigger and switch.
Im using the tags of the spotlights in each room of a house to control them, each room has about 8 spotlights. But i need to change the material of the actual spot mesh (a plane with an alpha spotlight material). Id rather not have to create a blueprint that includes each spotlight object. Is there a way I could change the spot mesh material throughout the scene to either an off or an on version within my blueprint?

Thanks

Get All actor of class > For each loop > your code

ok thanks but how do i get the spotlight material i want to change be part of the actor class?

Look for dynamic material instance and scalar parameter in material <> Blueprint