title: Unity random object generation always returning same object
body: <p>In the vertical game, I am creating random blocks spawn within a 100f. I am randomly creating 3 different types of objects which are 'platforms' 'boostplatforms' and 'breakableplatforms'. My code for generating all of these give no errors and when I run the game the blocks generated when I check the activity however visually only the objects named 'platform' appear. </p>
  
  <p>The coding I used for this was: </p>
  
  <pre class="lang-c# prettyprint-override"><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class LevelGenerator : MonoBehaviour {
  
      public GameObject platformPrefab;
      public GameObject platformPrefab2;
      public GameObject platformPrefab3;
  
      public int numberOfPlatforms = 999;
      public int numberOfBoostPlatforms = 999;
      public int numberOfBreakablePlatforms = 999;
      public float levelWidth = 100f;
      public float minY = 55f;
      public float maxY = 120f;
  
      // Use this for initialization
      void Start () {
  
          Vector3 startPosition = new Vector3 ();
  
          for (int i = 0; i &lt; numberOfPlatforms; i++) 
          {
              startPosition.y += Random.Range (minY, maxY);
              startPosition.x = Random.Range (-levelWidth, levelWidth);
              Instantiate (platformPrefab, startPosition, Quaternion.identity);
          }
  
          for (int i = 0; i &lt; numberOfBoostPlatforms; i++) 
          {
              startPosition.y += Random.Range (minY, maxY);
              startPosition.x = Random.Range (-levelWidth, levelWidth);
              Instantiate (platformPrefab2, startPosition, Quaternion.identity);
          }
  
          for (int i = 0; i &lt; numberOfBreakablePlatforms; i++) 
          {
              startPosition.y += Random.Range (minY, maxY);
              startPosition.x = Random.Range (-levelWidth, levelWidth);
              Instantiate (platformPrefab3, startPosition, Quaternion.identity);
          }
  
      }
  
      // Update is called once per frame
      void Update () {
  
      }
  }
  </code></pre>