iTween.CameraTexture C# (CSharp) Method

CameraTexture() public static method

Creates and returns a full-screen Texture2D for use with CameraFade.
public static CameraTexture ( Color color ) : Texture2D
color Color /// Color ///
return Texture2D
    public static Texture2D CameraTexture(Color color)
    {
        Texture2D texture = new Texture2D(Screen.width,Screen.height,TextureFormat.ARGB32, false);
        Color[] colors = new Color[Screen.width*Screen.height];
        for (int i = 0; i < colors.Length; i++) {
            colors[i]=color;
        }
        texture.SetPixels(colors);
        texture.Apply();
        return(texture);
    }
iTween