PC-PAUL\paulf 5a58064e4d Fixed a lot of errors:
Obosolet methods, null references
Removed dead code
Clean Code
2025-01-16 11:07:26 +01:00

27 lines
549 B
C#

using Assets.Scripts.GameSession;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class RestartButton : MonoBehaviour
{
[SerializeField] public Button restartButton;
public void Start()
{
if (restartButton != null)
{
restartButton.onClick.AddListener(RestartGame);
}
else
{
Debug.LogError("RestartButton is not assigned in the inspector!");
}
}
public void RestartGame()
{
GoToScene.GoToSoloMode();
}
}