How do you access alpha on a mobile Alpha Blended shader?

Hi there,

I’m making a mobile game, and I need to change the opacity of a material.
The material is Mobile/Particles/Alpha blended.

Color c = SettingsSymbol.GetComponent<Renderer>().material.GetColor("_TintColor");

Does not work, as well as other generic options. Is it even possible to change the color with the material? Is there another one that could do the trick for mobile? If not, how could I make such a shader?

Any help is greatly appreciated :smiley:


You need to use SetColor

Color c = material.GetColor("_TintColor");
c.a = myAlphaValue;
material.SetColor("_TintColor", c);