18 lines
383 B
C#
18 lines
383 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class RespawnScript : MonoBehaviour
|
|
{
|
|
private string currentScene;
|
|
|
|
public void RespawnOnCurrentScene()
|
|
{
|
|
Scene scene = SceneManager.GetActiveScene();
|
|
currentScene = scene.name;
|
|
SceneManager.LoadScene(currentScene);
|
|
|
|
}
|
|
}
|