Search Issue Tracker

Won't Fix

Votes

5

Found in

2017.4

2018.3.14f1

2019.3

Issue ID

1160854

Regression

No

Unity editor freezes on Play mode when using SceneManager.LoadSceneAsync

Scene Management

-

To reproduce:
1. Open the attached project from google drive
2. Open scene SampleScene and press Play

Actual result: Unity editor freezes
Expected result: Unity editor should not freeze

Reproduced with: 2017.4.30f1; 2018.4.4f1;2019.1.10f1; 2019.2.0b10; 2019.3.0a9

Note: Crashes on the standalone build.

Code:
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
SceneManager.LoadSceneAsync(Scene02);
}

  1. Resolution Note:

    User error: The user makes a recursive call to LoadSceneAsync() by subscribing to the SceneManager.sceneLoaded event and loading the same scene over and over again without any checks that the scene is already loaded.

    Note: In play mode it is allowed to load the same scene multiple times so we will not prevent loading the same scene.

Comments (4)

  1. TCemAlpaydin

    Jan 06, 2022 01:46

    I am having this, at 2 weeks into my own deadline on 2020 lts

  2. timofffee_unity

    Apr 15, 2021 07:24

    2021 is here.
    Bug is here.
    The bug still shows up and it can't be fixed.

  3. TCRyan

    Nov 23, 2019 23:13

    I am having same issue with 2019. What's messed up is that it works at first, then stops working with no changes in the scene getting loaded, just the shell scene. I've stripped everything out of the scenes, created new mostly empty scenes and it still craps out. Rebooting my PC will make it work for a bit. I'm guessing something is being left in memory. I did add a StopAllCoroutines on application exit, but that didn't help.

  4. Saturn1004

    Aug 21, 2019 23:57

    This is probably what's happening to me too. Started having random freezes when I load a new scene async after updating Unity, worked perfectly fine before.
    Kinda regret not sticking with Unity 2017.1 for this and many other reasons.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.