Possible to shift MeshFilter UV coords for different instantiations?

I am instantiating 100 cubes, zooming their texture to just one pixel color, and then offsetting the UV coords of each instantiateObject so that they will display a different pixel of the texture on each cube, hence a different color.

The code runs fine but the colors are still all the same.

here is an easy small code demo, you could copy it to a spawnpoint object and set a cube prefab and it would run.

var bullet : Transform;
private var rot : Quaternion;
var span : float = 4;

function Start()
{
    for (var i : float = 0; i<100; i++)
    {
			 var r1 =  ((2734.8765453443*i)%1); 
		 var r2 =  ((24.8765443*i)%1);
        rot.eulerAngles = Vector3(0,0,0);
        var InstantiateObject = 
		Instantiate(bullet, Vector3(((Mathf.Ceil(i*.1))%10)*10,(i%10)*10,0), rot);
        InstantiateObject.localScale += Vector3(.9,.9,r2*66);
		

		 
		 
		 
		InstantiateObject.renderer.sharedMaterial.SetTextureScale ("_MainTex", Vector2(.001,.001));

			 // Build the uvs 
    var uvs : Vector2[] = new Vector2[(InstantiateObject.GetComponent(MeshFilter) as MeshFilter).mesh.vertices.Length]; 
    uvs = (InstantiateObject.GetComponent(MeshFilter) as MeshFilter).mesh.uv; // Take the existing UVs 


    for (var k = 0 ; k < uvs.Length;k++) uvs[k] = Vector2 (uvs[k].x + r1, uvs[k].y +r2); // Offset all the UV's 

   // Apply the modded UV's 
    (InstantiateObject.GetComponent(MeshFilter) as MeshFilter).mesh.uv = uvs; 

    
    }
}

SOLUUUTION code below. I feel like jesus that just spent 40 days in the desert. this unity rendering trick + associated code took me 30 hours last summer, and 10 hours just now, to discover.

The above code was ok except that i should have tested with texture zoomed out. it looks fine, but when you zoom texture in x1000, for some reason the UV offsets only for the pixel that is in view, so uv offsetneeded to be multiplied by 1000, hence all teh same color. so with this solution you have a texture atlas color picker for your unity procedural building blocks. !!! Wooot! what started out as material.color went through literally 500 pages of forum posts and google searches to puzzle together a solution! NO where on the forum is there an alternative for .material.color written in code for us newbies, that doesnt take 1000 draw calls!!! it’s insane!

here is my valliantly pieced together alternative for material.color: thanks to jtbentley

var bullet : Transform;
private var rot : Quaternion;
var span : float = 4;

function Start()
{
    for (var i : float = 0; i<100; i++)
    {
          var r1 =  ((2734.8765453443*i)%1); 
        var r2 =  ((24.8765443*i)%1);
        rot.eulerAngles = Vector3(0,0,0);
        var InstantiateObject = 
       Instantiate(bullet, Vector3(i,i,i), rot);
       // InstantiateObject.localScale += Vector3(.9,.9,r2*2);





       InstantiateObject.renderer.sharedMaterial.SetTextureScale ("_MainTex", Vector2(.001,.001));

          // Build the UVs 
    var uvs : Vector2[] = new Vector2[(InstantiateObject.GetComponent(MeshFilter) as MeshFilter).mesh.vertices.Length]; 
    uvs = (InstantiateObject.GetComponent(MeshFilter) as MeshFilter).mesh.uv; // Take the existing UVs 


    for (var k = 0 ; k < uvs.Length;k++) uvs[k] = Vector2 (uvs[k].x + r1*1111, uvs[k].y +r2*1111); // Offset all the UVs 

   // Apply the modded UVs 
    (InstantiateObject.GetComponent(MeshFilter) as MeshFilter).mesh.uv = uvs; 


    }
}

here is the code: