Установка единства
gameObject.GetComponent<Renderer>().material = newMaterial;
Yawning Yacare
gameObject.GetComponent<Renderer>().material = newMaterial;
// in the Start() method
Material yourMaterial = Resources.Load("red", typeof(Material)) as Material;