unity differet ways to switch scenes code example
Example 1: how to switch scenes unity
SceneManager.LoadScene("MyScene");
Example 2: switch between scenes unity
using UnityEngine.SceneManagement;
SceneManager.LoadScene('Scene');
SceneManager.LoadScene("MyScene");
using UnityEngine.SceneManagement;
SceneManager.LoadScene('Scene');