title: Spawn after throw in unity
body: <p>I want my object to respawn after 1 second when I throw that object to air.I tried below code but cant figure out the solution.If someone please help me solving this problem!</p>
  
  <pre><code>public Transform[] SpawnPoints;
  public GameObject ball;
  public GameObject lastBall;
  
  void Update(){
      {
          int SpawnIndex = Random.Range (0, SpawnPoints.Length);
          lastBall = Instantiate (ball, SpawnPoints [SpawnIndex].position, SpawnPoints [SpawnIndex].rotation) as GameObject;
      }
  }
  </code></pre>