Win screen (needs name change)
This commit is contained in:
17
Assets/Scripts/BackToStart.cs
Normal file
17
Assets/Scripts/BackToStart.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class BackToStart : MonoBehaviour
|
||||
{
|
||||
public void returnToStart()
|
||||
{
|
||||
Destroy(GameObject.Find("Car Data"));
|
||||
Destroy(GameObject.Find("SkyboxManager"));
|
||||
Destroy(GameObject.Find("GameManager"));
|
||||
SceneManager.LoadScene(0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user