Search Unity

LoadLevelAsync GI taking too much time to load?

Discussion in 'Global Illumination' started by geroppo, Feb 14, 2017.

  1. geroppo

    geroppo

    Joined:
    Dec 24, 2012
    Posts:
    140
    Currently I'm loading a scene that has realtime GI with LoadLevelAsync, I don't mind that it takes several seconds, so long as it doesn't freeze the main thread so I can at least show a pretty loading animation.
    But it's not the case, the lighting and assets seem to be getting loaded on the main thread at once, so I have to wait between 200 and 400ms for it to finish. Is this normal behaviour?

    I've noted that setting the AsyncOperation to 0 does nothing, and the spike happens on scene activation only. If I set allowSceneActivation to false, the scene loads until 90% without problems, but then I set the variable to true and starts loading the lighting data.
    Here are some screenshots:
    Screenshot_3.png
    Screenshot_4.png
     
  2. Chris-Clark

    Chris-Clark

    Joined:
    Jan 16, 2012
    Posts:
    130
    It's definitely the GI system. LoadLevelAsync works great except for that last step when bringing in the GI data. The problem is that last little bit seems to run on the main thread and halts the renderer until it is done.

    If Unity could just thread that last bit or spread it out across several frames it would be much better.

    Can you post this info to the issue tracker with those screenshots? I haven't seen anyone else mention it there. https://issuetracker.unity3d.com/