Search Unity

Discussion scene loads slower and takes long

Discussion in 'Editor & General Support' started by surifier, May 2, 2023.

  1. surifier

    surifier

    Joined:
    Sep 24, 2021
    Posts:
    4
    Hi guys for me the same issue is happening scene takes more time to load and also it takes more than 16mins to load game mode in our game only one levels takes more time to load have no idea why it is profiler and console seems clean and no issue with that we using unity 2021.3.21f1 lts version can someone please assist regarding this issue?
     
  2. OBiwer

    OBiwer

    Joined:
    Aug 2, 2022
    Posts:
    61
    you should try to end your sentences with a dot. It really helps readability.

    • How large is the scene file, for the scene that takes so long?
    • Have you tried to attach the profiler to the Editor (instead to the Player) and see what happens when pressing play?
    • Are you using the fast-enter-playmode settings? Unity - Manual: Configurable Enter Play Mode (unity3d.com)
    • Does it also take that long, if you open another scene and then load this scene additively?
    • Check your Awake/Start/OnEnable methods, if there are any super expensive calculations that are not in the other scenes. (Procedural world generation!?)
      • Disable all gameobjects in the scene and hit play. It should be fast now.
      • Do a binary search to find the culprit:
        • Enable half of the game objects. Is it slow again?
        • Yes, slow again → Disable half of the currently enabled gameobjects.
        • No, still fast → Enable half of the currently disabled gameobjects.
        • If "half of the ..." in step 3./4. is a low number of objects (e.g. 1) checkout that gameobject and why it makes the scene so slow.
          If the number of Objects is still large rinse and repeat enabling/disabling half of them.
     
    Last edited: May 2, 2023