var fillColor : Color = Color(1, 0.0, 0.0);
var fillColorArray = tex2.GetPixels();
for(var i = 0; i < fillColorArray.Length; ++i)
{
fillColorArray *= fillColor;*
Texture2D targetTexture= new Texture2D(originalTexture.width, originalTexture.height);
GetComponent().material.mainTexture = targetTexture;
for (int y = 0; y < originalTexture.height; y++) {
for (int x = 0; x < originalTexture.width; x++) {
targetTexture.SetPixel(x, y, Color.green);
}
}
targetTexture.Apply();