- Home /
I figured out a work around solution
Object with an extra material is blending the extra one with another!
So I have an object, and it has three material slots on the mesh, but I gave the object 4 materials because I'm swapping the mesh at runtime to one that uses all 4 materials. The problem is that when it's using the mesh with only 3 material slots when it's in light it Blends the two materials?? I don't quite understand, and if that's unclear he's some images:
Here it is in no light, with a plain blue diffuse material, which is what it should look like always
BUT when i get near a light source, it blends with the extra material. (Which is shown in this picture, a diffuse red) This makes it purple, which is NOT what i want!
What is the issue? Is there a way to add a material at runtime instead of it just holding an extra one?
Answer by pickle chips · Aug 26, 2013 at 03:57 PM
It's ok I just set the extra material's colour to the same as the main one, so it's no longer an issue. It's just a workaround solution, but it works. Thanks though for the help.
Answer by getyour411 · Aug 26, 2013 at 04:17 AM
You can add a material at runtime
http://answers.unity3d.com/questions/168996/assign-material-at-run-time.html
I don't see anywhere on that thread on how to add a material, it's just talking about changing a material?