I have a light Bulb that goes off eventually through Animation. It has a Illuminated Material, I need to change the Material when the light goes off in Animation. How to do it?
I have both the Illuminated and off materials.
I have a light Bulb that goes off eventually through Animation. It has a Illuminated Material, I need to change the Material when the light goes off in Animation. How to do it?
I have both the Illuminated and off materials.
@ddulshan Well, five years later, but here’s finally an answer.
Hopefully you figured something out and weren’t trapped in developer limbo all this time, but I thought I would post in case anyone else has a similar question.
start your animation
change your material using this
if( renderer.material == material1 ) {
renderer.material = material2;
}
else {
renderer.material = material1;
}