1 using System;
2 using
UnityEngine;
3 using
UnityEngine.SceneManagement;
4
5 namespace
UnityStandardAssets._2D
6 {
7     
public class Restarter : MonoBehaviour
8     {
9         
private void OnTriggerEnter2D(Collider2D other)
10         {
11             
if (other.tag == "Player")
12             {
13                 SceneManager.LoadScene(SceneManager.GetSceneAt(
0).path);
14             }
15         }
16     }
17 }


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