Hi,
Texture2D texture = new Texture2D(size, size, TextureFormat.RGBA32, false);
renderer.material.mainTexture = texture;
Color32[] color = new Color32[size2];
int y = 0;
while (y < texture.height) {
int x = 0;
while (x < texture.width) {
color [x+y] = new Color32(128,0,0,255);
++x;
}
++y;
}
texture.SetPixels32(color,0);
texture.Apply();
}
I can’t get this to work. All I get is a red line painted down one edge of the texture. Can someone help me out?
Thanks