Set the material for the canvas renderer. If a texture is specified then it will be used as the 'MainTex' instead of the material's 'MainTex'. See Also: CanvasRenderer.SetMaterialCount, CanvasRenderer.SetTexture.
public void SetMaterial(Material material, Texture texture) { this.materialCount = Math.Max(1, this.materialCount); this.SetMaterial(material, 0); this.SetTexture(texture); }
public void SetMaterial(Material material, UnityEngine.Color ac) { if (canvasRenderer.GetMaterial() != material) { canvasRenderer.SetMaterial(material, null); } additionalColor = ac; buffer.modified = true; }