Unity记录 Posted on 2019-07-17 Edited on 2023-02-17 In Unity 相同的材质,属性不同,避免创建新的材质 MaterialPropertyBlock 123456//会创建一个新的材质meshRenderer.material.color = clolr;//不会创建一个新的材质var propertyBlock = new MaterialPropertyBlock();propertyBlock.SetColor("_Color", color);meshRenderer.SetPropertyBlock(propertyBlock);