Scene Manager error Crash Detector

Hello guys,
Im getting an error that says “Scene Manager does not contain a definition for Reload Scene”.
i tried switching the value from 0 to “Level 1” but it doesnt help.

public class CrashDetector : MonoBehaviour

{

[SerializeField] float loadDelay = 1f;

 void OnTriggerEnter2D(Collider2D other)

{

    if(other.tag == "Ground")

    {

       Invoke("ReloadScene", loadDelay);

    }

}

    void ReloadScene()

{

    SceneManager.ReloadScene(0);

}

}

SceneManager does indeed not contain a definition for ReloadScene

You need to call SceneManager.LoadScene(0);

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms