error CS0120: An object reference is required for the non-static field, method, or property ‘Behaviour.enabled’
using UnityEngine;
using UnityEngine.SceneManagement;
public class GameManager : MonoBehaviour
{
public Movement M;
public float levelRestartDelay = 2f;
public void EndGame()
{
Movement.enabled = false;
Invoke("RestartLevel", levelRestartDelay);
}
void RestartLevel()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}