applying a material to parts of a object unity code example Example: unity set material gameObject.GetComponent<Renderer>().material = newMaterial;