Changing scenes crashes the game

I’m making a PC game where I need to change some scenes from time to time. I use simple lines like

SceneManagement.SceneManager.LoadScene ("menu");

But after doing some scene changes the game crashes(the freezing “not responding” type of thing) on a lot of computers. I tried adding SceneManagement.LoadSceneMode.Single, or even SceneManager.UnloadSceneAsync(UIManager.Instance.currentScene);, but none of these worked. Any help please?

I have a splash scene, which transitions to a menu scene and then from the menu it can change to the game intro(new game), or load the game on the first main level, or the second. When players start a new game the intro scene is going to change to the first level. After that, if they beat the first level they will get access to the second one. But when they try to load it the game crashes. Changing this level file to level0 works okay and on my PC everything there works as intended. Nothing is creating a loop, it’s just the “too much scene changes”, because I had an another PC on which a dude died which led him to the “game over” scene and from there he couldn’t either start a new game or load a game because it freezed forever.

This only happens to other players on the built game.

Good day.

As D3Duck says, we need more info, YOU need more info.

Are you sure the cause is loading too much? Maybe is always the same scene that freezes, or some method with a “while” creating a infinite loop, or some resource that is corrupted, etc…

You need first to be sure what is causing the freeze, you can debug the code, change scene loading order, etc… to be sure what is the cause.