I'm creating a pause menu for my game and I have two scenes: a menu scene (Scene1) and a game scene (Scene2). I load them using the command 'SceneManager.LoadScene(1);' for the menu scene and 'SceneManager.LoadScene(2);' for the game scene.
The game mission opens successfully when I transition from the menu scene to the game scene for the first time. However, if I pause the game and return to the menu scene, and then try to go back to the game scene, the game freezes. This problem also occurs in the build version of the game.
Upon deep profiling, I found that the second 'WaitForAsyncOperationToComplete()' call is making expensive calls. I have tried minimizing my 'Start()' and 'Awake()' methods, but nothing seems to work.