title: Unity Gizmos for arraylist
body: <p>How can i apply Gizmos to parallel arrays of positions ?
  The current code i have now is that, the Gizmos does its job.
  But since its a loop, it flashes which means going through the loop and drawing an array using the method</p>
  
  <pre><code>Gizmos.DrawRay();
  </code></pre>
  
  <p>But i don't want it to go through the loop and draw a ray and then removing it and repeating the process with a new position.
  I want it to draw a ray for every element in the array and have the ray fixed where it doesn't get rewritten.
  So here is my current code.</p>
  
  <p><strong>Edit :</strong></p>
  
  <pre><code>void Platform_Position_Scale_Generator(int i) {
  
      posX[i] = Random.Range(minPosRange, maxPosRange + 1);
      posY[i] = Random.Range(minPosRange, maxPosRange + 1);
      posZ[i] = 0;
  
      scaleX[i] = Random.Range(minScaleRange, maxScaleRange + 1);
      scaleY[i] = 1;
      scaleZ[i] = 1;
  
  }
  
  void Platform_Generator(int i) {
  
      platformPrefabPosition[i].x = posX[i];
      platformPrefabPosition[i].y = posY[i];
      platformPrefabPosition[i].z = posZ[i];
  
      Instantiate(platformPrefab, platformPrefabPosition[i], Quaternion.identity);
      platformPrefab.transform.localScale = new Vector3(scaleX[i], 1, 1);
  
  
  }
  
  void OnDrawGizmos() {
      if(numOfGeneratedPlatforms &lt; numOfPlatformsToGenerate) {
          Platform_Position_Scale_Generator(numOfGeneratedPlatforms);
          Platform_Generator(numOfGeneratedPlatforms);
  
          Gizmos.color = Color.blue;
          Gizmos.DrawRay(new Vector3((posX[numOfGeneratedPlatforms]), (posY[numOfGeneratedPlatforms]), (posZ[numOfGeneratedPlatforms])), transform.TransformDirection(Vector3.up));
          numOfGeneratedPlatforms++;
  
      }
  }
  </code></pre>