Search Unity

Question PostLoadSceneStaticLightmapSettings taking 120ms on Additive Scene Load

Discussion in 'Global Illumination' started by alexandre-fiset, May 5, 2022.

  1. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    PostLoadSceneStaticLightmapSettings is taking more than 120ms on Additive Scene Loading.

    Is there a way to avoid that hiccup?
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Have you tried loading your scenes asynchronously? Does that happen with simple scenes as well? If you can create a simple repro project, I'd recommend that you'd report a bug so that we could investigate.
     
  3. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    Yes we load async, but that method doesn’t seem async at all.

    Our project is 400 gb in size. Always an issue when it comes to logging bugs.

    I wonder: Does it help, performance-wise, for scenes to share the same lighting settings?
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Lighting setting should have no impact on runtime performance, unless you have Enlighten Realtime GI enabled.

    If you'd manage to reproduce this bug in a smaller project, please let us know and we'll take a look.
     
  5. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    Ok so for anyone who might stumble upon this thread, it looks like we have to bake all scenes together to avoid the PostLoadSceneStaticLightmapSettings hiccup.

    Our usual workflow was to bake scenes seperately from each other because they are enormous, but that causes ~200ms on average of CPU spike on a AMD Ryzen 7 5700G when loading scenes additively.

    TL;DR bake all your scenes together and not separately.
     
    kristijonas_unity likes this.