H_SafeExperienceDrivingSystem/U3D_DrivingSystem/Assets/Script/Old/Restart_InScene3.cs

20 lines
445 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class Restart_InScene3 : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
this.transform.GetComponent<Button>().onClick
.AddListener(Reset1);
}
private void Reset1()
{
SceneManager.LoadScene("Bule_Scene1");
}
}