change a material to another in code code example Example: unity set material gameObject.GetComponent<Renderer>().material = newMaterial;