how to check if scene is loaded 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");
}
}