Material[] materials = meshRenderer.materials; Material oldMaterial = materials[0]; Material[] newMaterials = new Material[] { SphereMaterial}; meshRenderer.materials = newMaterials;