Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

change object material unity

Material[] materials = meshRenderer.materials;
Material oldMaterial = materials[0];
Material[] newMaterials = new Material[] { SphereMaterial};
meshRenderer.materials = newMaterials;
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #change #object #material #unity
ADD COMMENT
Topic
Name
1+3 =