using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class RestartManager : MonoBehaviour { public GameObject restartButton; void Start() { if (restartButton != null) restartButton.SetActive(false); } public void ShowRestart() { FindObjectOfType()?.ShowSlider(); if (restartButton != null) restartButton.SetActive(true); } public void HideRestart() { if (restartButton != null) restartButton.SetActive(false); } public void RestartSimulation() { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); } }