To answer your specific question, you will only get a new material instance onceā¦the first time you change any material property. After that, your object will use the same material instance. To demonstrate, run this:
#pragma strict
private var mat : Material;
function Start() {
mat = renderer.sharedMaterial;
}
function Update () {
if (mat != renderer.sharedMaterial) {
Debug.Log("Material different");
mat = renderer.sharedMaterial;
}
renderer.material.color = Color(Random.value, Random.value, Random.value);
}