title: How can I spawn enemies within a specified random interval?
body: <p>I am looking to get enemies to spawn at a random interval between 5 and 15 seconds.</p>
  
  <p>Here is the code I have now. I have the move/transform script on the prefab enemy.</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class Spawner : MonoBehaviour {
  
      public float spawnTime = 5f;        // The amount of time between each spawn.
      public float spawnDelay = 3f;       // The amount of time before spawning starts.        
      public GameObject[] enemies;        // Array of enemy prefabs.
  
      public void Start ()
      {
          // Start calling the Spawn function repeatedly after a delay .
          InvokeRepeating("Spawn", spawnDelay, spawnTime);
      }
  
      void Spawn ()
      {
          // Instantiate a random enemy.
          int enemyIndex = Random.Range(0, enemies.Length);
          Instantiate(enemies[enemyIndex], transform.position, transform.rotation);
      }
  }
  </code></pre>
  
  <p>This currently spawns enemies every 3 seconds. How can I spawn an enemy every 5 to 15 seconds?</p>