RestartGameCoroutine









How do I use Restart Game Coroutine
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: GameManagerScript.cs Copy
44  public void RestartGame () {
45   StartCoroutine ("RestartGameCoroutine");
46  }
File name: GameManagerScript.cs Copy
48  public IEnumerator RestartGameCoroutine() {
49   player.gameObject.SetActive (false);
50   yield return new WaitForSeconds (0.5f);
51   player.transform.position = playerStartPoint;
52   groundGenerator.position = groundStartPoint;
53   player.gameObject.SetActive (true);
54  }

RestartGameCoroutine 113 lượt xem

Gõ tìm kiếm nhanh...