search for a scene with name with unity code example
Example: unity how to see what scen you are in
void Update()
{
if (SceneManager.GetActiveScene () == SceneManager.GetSceneByName ("scene1"))
{
SceneManager.LoadScene ("scene2");
}
else if (SceneManager.GetActiveScene () == SceneManager.GetSceneByName ("scene2"))
{
SceneManager.LoadScene ("scene1");
}
}