How to create tiled map correctly?

Hey guys, I am newbie in Unity, I start to develop a Unity project TODAY. Sorry about the stupid question I ask, but I really don’t know where I do wrong.

first, I follow this tutorial and try to create a tiled map.
Then I have a C# script called GameManager which will create the tiled map by the following code:

int rows = 5;
int columns = 10;
private Transform shopHolder;

void initDirts() {
		shopHolder = new GameObject ("Shop").transform;
		for (int x=0; x<columns; x++) {
			for(int y=0; y<rows; y++ ) {
				GameObject obj = dirts[Random.Range(0, dirts.Length)];
				GameObject instance = Instantiate(obj, new Vector3(x,y,0f), Quaternion.identity) as GameObject;
				instance.transform.parent = shopHolder;
				Debug.Log(instance);
			}
		}
	}

But when I run the project to see result, it shows like this:

The position of each tile is too far, I expect them should be stay together. But I don’t know how to do that. Can someone give some direction?

Here is the GameObject in prefab and its setting in my Unity project, each of the sprite size is 32x32 pixels.
56619-setting.png

Pixels and World Space units aren’t the same. So you need to either resize the sprites or change their position when they are instantiated.

GameObject instance = Instantiate(obj, new Vector3(x,y,0f), Quaternion.identity);
instance.transform.localScale = new Vector3(4f, 4f);    // change the scale in runtime

 
float positionScale = 0.25f; // scale the distance between sprites
GameObject instance = Instantiate(obj, new Vector3(x*positionScale ,y*positionScale ,0f), Quaternion.identity) as GameObject;

Alternatively, you can use a Quad. Since quads are sized for world space, I mean, you wont have to scale anything, quads can be aligned in a simple loop like in your example.

oh my god! I know why…

Because the sprite sheet generated by TexturePacker, the default value of “Pixels Per Unit” is 100. However, the value of tutorial’s sprite sheet is 32.
56657-screen-shot-2015-10-22-at-11848-pm.png

I change the value from 100 to 32, then everything is fine now!

I am really newbie in Unity… Orz.
Sorry about this stupid question again. =.,=