renderer material size

How do I change it? I’ve search everywhere, but can only find examples that give you the length which would be the size.

Help Please
Example of size:

object.AddComponent("MeshRenderer");
print ("I'm using " + object.renderer.materials.Length + " material(s)");

How do I change the size so I can add materials to my submesh

Make an array of Materials that’s the size you want.

var myMaterials = new Material[10]; // 10 materials, whee

–Eric

Thank you!

I think I read that somewhere in the past also and it just slipped my mind until you answered my question.