我希望我的对象在1秒后重新生成,当我将该对象抛向空中时。我尝试了下面的代码,但无法找出解决方案。如果有人请帮我解决这个问题!
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;
}
}