switch scenes script unity code example
Example 1: how to switch scenes unity
SceneManager.LoadScene("MyScene");
Example 2: how to change scenes in unity
SceneManager.LoadScene(scenename);
SceneManager.LoadScene("MyScene");
SceneManager.LoadScene(scenename);