Any simpler way of writing this? — Changing the alpha of a named color value?

var newCol = myObject.renderer.material.GetColor(“_TintColor”);
newCol.a = 0;
myObject.renderer.material.SetColor(“_TintColor”, newCol);

It’s quite a lot of code just to change the alpha value, was wondering if there’s a simpler way I might have missed?

Nope that’s pretty much it I’m afraid :slight_smile: Though if you are doing it often or in a loop you should have cached the material to avoid repeating the lookups.