I synthesize a texture using “new Texture2D” and “SetPixel”. I assign this to a “GUITexture.texture”. Why is this displayed as if all pixels were transparent gray? PNG textures are displayed correctly.
Example of synthesized texture (Tx) on a GUITexture instance.
Texture2D Tx = new Texture2D(128,128,TextureFormat.ARGB32) ;
for( int i=0 ; i<Tx.width ; i++ )
for( int j=0 ; j<Tx.heigth ; j++ )
Tx.SetPixel(i,j,new Color(0f,0.5f,1f,1f)) ;
GameObject.Find("Blue Square").GetComponent<GUITexture>().texture = Tx ;