I have two questions with regard to fading in out / changing the alpha value over time:
1.) FadeIn/Out a GUITexture:
I would like to fade in / out a GUITexture on a certain event. So I have found the JS FadeIn-Script
(http://www.unifycommunity.com/wiki/index.php?title=FadeIn) and would like to modify it a bit and make it C#.
Now in C# when I type
guiElement.color = Color.red;
I get the following error:
‘UnityEngine.GUIElement’ does not contain a definition for ‘color’
→ What would be the C# equivalent for this??
2.) Change color/alpha of a Plane:
In the Start()-function I set the color of the plane to which the script is applied:
renderer.material.color = new Color(1,0,0,a);
The color is set fine (I have tried with several), though the alpha value has no impact (plane is always opaque)
→ Why??