I am working on a tile based game. I have the tiles laying out perfectly. The problem is how to name them and then access them again. I have named them as below.
pieces[x,z].name = "p"+x + "p" + z;
so it should be named p1p1, p1p2 etc.
How do I now access these pieces. Like p2p3.x = 50 or something.
If you have the array:
If you want to use GameObject.Find (slow):
answered Dec 06 '11 at 10:24 AM