gather-and-defend/Assets/Scripts/ReloadSceneButton.cs

16 lines
337 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class ReloadSceneButton : MonoBehaviour
{
public void ReloadCurrentScene()
{
string currentSceneName = SceneManager.GetActiveScene().name;
SceneManager.LoadScene(currentSceneName);
}
}