Help with fading

I keep getting a error when I have this line.
GUI.color.a = Fade;

Error
…Consider storing in a temp ver…

How do I change the GUI.color.a to match another var.
Thanks

Do what the error message says. You can only directly change GUI.color.a in JS, not C# (from the user’s point of view anyway, since technically JS uses a temporary variable behind the scenes for you).

–Eric

Ok
I tried to do this
float temp = GUI.color.a;
temp = fade;

Now how do I change GUI.color.a to temp

I think you have to call the whole Color function. Like this :

GUI.color = new Color(float,float,float,fade);

I will try it.
Thanks

It works!
Thanks BlackSpider

Could you post a snippet of your code here?

here
GUI.color = new Color(float,float,float,fade);
now go lean some sense