Hi,
I have some models which contain several materials each, stored in the renderer.materials[ ] array (7 materials per model). Now I’m creating new materials on the fly via loading pre-defined material like “Material material_0 = Resources.Load(“material_0”) as Material” (e.g.) and assign them to these materials[ ] arrays like renderer.materials[0] = material_0. Works fine.
But my problem is that - even when I assign every time and every model the same material - assinging always creates an instance of the this material! So batching wont work. I wonder why. I do not change any property of the material, tried several rendering and lighning modes and the objects do not receive shadows. The materials are simple diffuse materials with a single texture each.
Thanks for suggestions in advance!
Axel