title: Unity - instantiate objects in a loop with spacing between each other
body: <p>I generate a grid of cubes by 10x10. My cells are different, I choose them out of an array.</p>
  
  <p>What I need is a small spacing between each cell.</p>
  
  <p>This is my code so far</p>
  
  <pre><code>private void Start()
  {
      for (int x = 0; x &lt; data.MapSize.x; x++)
      {
          for (int y = 0; y &lt; data.MapSize.y; y++)
          {
              Instantiate(data.Cells[Random.Range(0, data.Cells.Length)]), new Vector3(x, 0, z), Quaternion.identity); // Create a specific cell on position (x,y)
          }
      }
  }
  </code></pre>
  
  <p>So what I've tried out:</p>
  
  <pre><code>new Vector3(x + 1, 0, z + 1)
  
  new Vector3(x * 0.1f, 0, z * 0.1f)
  </code></pre>
  
  <p>but obviously it won't change anything.</p>
  
  <p>So I tried out this:</p>
  
  <p>Before the start method I created a variable </p>
  
  <pre><code>int counter = 0;
  </code></pre>
  
  <p>and within the loops</p>
  
  <pre><code>counter += 0.1f;
  new Vector3(x + counter, 0, z + counter)
  </code></pre>
  
  <p>but then there appears no grid, I get an parallelogram.</p>