- Home /
This question was
closed Oct 27, 2015 at 08:33 PM by
Avash for the following reason:
The question is answered, right answer was accepted
Renderers with multiple materials
I added second material to a renderer to add script controlled glow for selected objects. Unfortunatelt everything didn't go as expected. When trying to access a material from the renderer all material turns to default material. What is the problem? Is there a workaround for this?
Comment
Do you have more than 1 submesh in your mesh? Otherwise a second material doesn't make sense. The first is the one being used if there's only one submesh in your mesh.
Why that doesn't make sense? I am not going to write a shader just to have transparent highlight. I fixed the thing. You need to set or get all materials in an array at once.