unity-atoms/Examples/Assets/InfiniteWaves/UI/TryAgainButton/RestartCurrentScene.cs
2020-03-20 01:29:39 +01:00

14 lines
317 B
C#

using UnityEngine;
using UnityEngine.SceneManagement;
namespace UnityAtoms.Examples
{
/// <summary>
/// Restart the current scene.
/// </summary>
public class RestartCurrentScene : MonoBehaviour
{
public void Do() => SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
}