I have done this before in another project, however no matter what I try it’s not working in this one. I have also searched through Unity Answers and scripting references, so bare that in mind before snarky comments please. The material applied to the objects is the additive particles shader.
Here is code in the Update() function.
FailColor = Color(1,1,1,FailAlpha);
FailAlpha -= 0.5 * Time.deltaTime;
ClickTimerObjFail.renderer.material.color.a = FailAlpha;
UILineRendererFailObj.renderer.material.color = Color(1,1,1,FailAlpha);
I’ve also tried ‘SetColor’, also with no luck. Is there a known bug with the latest Unity and setting colour’s in script or is there something I’m missing?
Thanks for taking the time to read this.