how do i create a "randomized infinite grid"? details here..

im new to anything scripting, so i need "extra explanations" to what your answers and solutions are! help me learn so i can apply and grow as an artist too =)!

i am trying to create an infinite "grid" if you may..i already roughly know how "it should work" but, i have not much idea how to actually write it.

i have 3 tiles...modeled in Maya, so they're assets now..named as such in unity and tagged as Tile.

-floorLF -floorMd -floorRT

i want to lay them out, in rows, in those 3 columns (left, mid, right)...in the Z axis.

now how can i make Unity "instantiate", i think thats the technique used here, these 3 tiles over and over, like below:

[x][x][x]
[x][x][x]
[x][x][x]
[x][x][x]
[x][x][x]
[x][x][x]

and i want this to never end basically..when it scrolls in the Z axis and "reaches the end", another set of the 3 tiles will be "Spawned" to create this infinity. i think somewhat like a 3column x 20rows would be great for what im trying to achieve...so "row21" wouldnt be there but when we scroll/travel/reach row15 or something near the "end", the new row21 would be craeted..and row1 would be "invisible/removed".

if there's any direct tutorials that can show me how to do this, that willbe great too. the unifywiki has nothing, answers.unity has nothing useful for my level of knowledge either..the 3dLerpztutorial and 2dtutorial didn't really help me find what i need either..and itween doesnt help me much either..key is i wanna learn and understand the code that will be written for this.

so thnks to anyone that can help me build, and teach me, what i need to do, showing me now is great, but i want explanation so i can further apply it to other tasks ahead, thanksthanksthanksthankss!!

i'm writing in C#. no js please!! well js is fine i guess, but then i'll need someone to help me change it to C# since my other scripts i wrote already in C#.

the unifywiki has nothing, answers.unity has nothing useful for my level of knowledge either..the 3dLerpztutorial and 2dtutorial didn't really help me find what i need either

This isn't the sort of thing you're likely to find covered on the Wiki or in a tutorial.

Although your question is fairly clear, IMO, there's not enough information there for us to make specific suggestions. The problem is that there are many ways what you describe could be done, and which method to choose depends on gameplay mechanics and other parameters.

That said, a simple solution would be to make the array 'tall' enough that there will always be tiles visible, and then continuously move (in a loop) the tiles down or the camera up. If you set it up right, this should give the effect of continuous scrolling.

Again though, depending on the game mechanics, another solution may be needed.

I believe that the Locamotion demo has a scene that does something similar to what you want. The character can walk in either direction and when he/she gets to a certain point, it deletes the last tiles and spawns new ones.

http://unity3d.com/support/resources/unity-extensions/locomotion-ik