Hi I basically want a texture with different pixels having different alpha values and this is not working…
`
public var alpha:float;
function Start () {
// Create a new 2x2 texture ARGB32 (32 bit with alpha) and no mipmaps
var texture = new Texture2D(2, 2, TextureFormat.ARGB32, false);
texture.SetPixel(1, 0, Color(1.0, 0, 0, alpha));
texture.SetPixel(1, 0, Color.white);
texture.SetPixel(0, 1, Color.green);
texture.SetPixel(1, 1, Color(0,0,1,0.7));
// Apply all SetPixel calls
texture.Apply();
// connect texture to material of GameObject this script is attached to
renderer.material.mainTexture = texture;
}
`