Plato
0
Q:

unity set material

currentObject.GetComponent<Renderer>().material = materialToAssign;
3
 Renderer rend = GetComponent<Renderer>();
 if (rend != null){
     rend.material = newMaterialRef;
 }
2
gameObject.GetComponent<Renderer>().material = newMaterial;
1

New to Communities?

Join the community