This should be basic right? Put a texture in front of the camera and make the alpha lerp, move towards, whatever to 0. Well, this code:
Texture2D theTexture;
void OnGUI (){
GUI.color.a = Mathf.Lerp(0.0f, 1.0f, (Time.time / 2));
GUI.DrawTexture( new Rect(0,0,Screen.width, Screen.height), theTexture);
}
produces this error:
error CS1612: Cannot modify a value type return value of `UnityEngine.GUI.color'. Consider storing the value in a temporary variable
I understand this would work in javascript, but C# makes GUI.color read only, how would I go about this?
Thanks in advanced.
Gotcha, I can't do individual variables of the color, I have to do all of them. Thanks!
– SnotE101