unity scenemanager only reload active scene

113 Views Asked by At
public void startscene(string scnm)
{
    Debug.Log("DF");
    SceneManager.LoadScene(scnm);
    Debug.Log("DF");
}

I used this code to go back to the menu scene and come to the game scene from the menu scene. And it workes fine when loading the game scene from the menu scene.
But it only reloads the active scene when I try to go back to the menu scene. What's the problem?

1

There are 1 best solutions below

0
On

The only explanation is that you are calling the method startscene passing the same scene name.