Answers for "unity update material properties"

C#
1

unity set material

gameObject.GetComponent<Renderer>().material = newMaterial;
Posted by: Guest on March-27-2020
1

change object material unity

Material[] materials = meshRenderer.materials;
Material oldMaterial = materials[0];
Material[] newMaterials = new Material[] { SphereMaterial};
meshRenderer.materials = newMaterials;
Posted by: Guest on November-11-2021

C# Answers by Framework

Browse Popular Code Answers by Language