using UnityEngine;
public class GameManager : MonoBehaviour
{
bool gameHasEnded = false;
public void EndGame() {
if (gameHasEnded == false)
{
gameHasEnded = true;
Debug.Log("Game Over");
Restart();
}
}
void Restart ()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
}
I get these erroer:
Assets\Scripts\GameManager.cs(23,32): error CS0103: The name ‘SceneManager’ does not exist in the current context
Assets\Scripts\GameManager.cs(23,9): error CS0103: The name ‘SceneManager’ does not exist in the current context
Eny sugjestions on how to fix it?