title: Why when i'm adding a space between the cubes on a grid the whole grid size is change?
body: <p>The grid is 10x10</p>
  
  <p>This is the original script before adding spaces:</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class GridGenerator : MonoBehaviour
  {
      public GameObject gridBlock;
      public int gridWidth = 10;
      public int gridHeight = 10;
      public List&lt;Vector3&gt; positions = new List&lt;Vector3&gt;();
      public List&lt;GameObject&gt; blocks = new List&lt;GameObject&gt;();
  
      private GameObject[] wallsParents = new GameObject[4];
  
      void Start()
      {
          wallsParents[0] = GameObject.Find("Top Wall");
          wallsParents[1] = GameObject.Find("Left Wall");
          wallsParents[2] = GameObject.Find("Right Wall");
          wallsParents[3] = GameObject.Find("Bottom Wall");
  
          GenerateGrid();
      }
  
      private void GenerateGrid()
      {
          for (int x = 0; x &lt; gridWidth; x++)
          {
              for (int z = 0; z &lt; gridHeight; z++)
              {
                  GameObject block = Instantiate(gridBlock, Vector3.zero, gridBlock.transform.rotation) as GameObject;
                  block.transform.parent = transform;
                  block.transform.tag = "Block";
                  block.transform.localScale = new Vector3(1, 0.1f, 1);
                  block.transform.localPosition = new Vector3(x, 0, z);
                  block.GetComponent&lt;Renderer&gt;().material.color = new Color(241, 255, 0, 255);
  
                  if (block.transform.localPosition.x == 0)//TOP
                  {
                      positions.Add(block.transform.localPosition);
                      block.transform.parent = wallsParents[0].transform;
                      block.transform.name = "TopWall";
                  }
                  else if (block.transform.localPosition.z == 0)//LEFT
                  {
                      positions.Add(block.transform.localPosition);
                      block.transform.parent = wallsParents[1].transform;
                      block.transform.name = "LeftWall";
                  }
                  else if (block.transform.localPosition.z == gridWidth - 1)//RIGHT
                  {
                      positions.Add(block.transform.localPosition);
                      block.transform.parent = wallsParents[2].transform;
                      block.transform.name = "RightWall";
                  }
  
                  else if (block.transform.localPosition.x == gridHeight - 1)//BOTTOM
                  {
                      positions.Add(block.transform.localPosition);
                      block.transform.parent = wallsParents[3].transform;
                      block.transform.name = "BottomWall";
                  }
  
                  blocks.Add(block);
              }
          }
      }
  }
  </code></pre>
  
  <p>And the result: The 4 walls are in place:</p>
  
  <p><a href="https://i.stack.imgur.com/2sdKj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2sdKj.jpg" alt="Grid"></a></p>
  
  <p>Then i changed the line:</p>
  
  <pre><code>block.transform.localPosition = new Vector3(x, 0, z);
  </code></pre>
  
  <p>To</p>
  
  <pre><code>block.transform.localPosition = new Vector3(x * 1.5f, 0, z * 1.5f);
  </code></pre>
  
  <p>And now the result is that the 4 walls are in wrong positions:</p>
  
  <p><a href="https://i.stack.imgur.com/chVVd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/chVVd.jpg" alt="grid"></a></p>
  
  <p>Do i need to multiply also the walls blocks too ?</p>
  
  <p>But if i multiply all the blocks already by 1.5f then why the walls blocks are not changing the position too by 1.5f ?</p>