Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Play mode taking insanely long.

Discussion in 'Editor & General Support' started by zakdank, Mar 20, 2021.

  1. zakdank

    zakdank

    Joined:
    Jan 25, 2011
    Posts:
    46
    Hi,

    So this is a weird one, it's a little intermittent and the length of time varies. Sometimes it takes 30 seconds, other times it can take upwards of 5 minutes. It does seem to be slowly getting progressively worse, it used to be consistently like 20-30 seconds but it's now on average 2-3 minutes. We've also had an instance where it took a good 16 minutes before I had to kill it with task manager.

    spriteAtlas.png

    I've profiled it and it's showing SpiteAtlasManager.OnEnterPlayModePreAwake-> Write asset changes to disk as the culprit. We don't use sprites in our project other than the UI but this seems to happen even on scenes with no UI.

    We also have no references to it in the code;
    spriteAtlas2.png

    The project is on an SSD (adata pro 1TB), the C:\ is also an SSD (Samsung Pro 970 M.2) and unity is installed on the C:\. I have deleted my library folder but it still persists and reimporting all doesn't seem to fix the issue either...

    Unity 2020.2.6f1 ( but we've had the issue since Unity 2019 ).

    Not sure if anyone has seen this before? Any suggestions on what to do? It's driving me insane.
     
  2. m0guz

    m0guz

    Joined:
    Mar 4, 2015
    Posts:
    31
    The only option I know about Sprite Packer is Project Settings > Editor > Sprite Packer. Maybe changing that value helps. Another shot is to create an empty project and copy Assets to new empty project to check if issue persist.
     
    Emanx140 and zakdank like this.
  3. zakdank

    zakdank

    Joined:
    Jan 25, 2011
    Posts:
    46
    Unsure of whether it's a permanent fix but I switched it to "Sprite Packer V1 - Builds only" and playmode was instant! Hoping it's sorted. Appreciate that, thanks!
     
    Emanx140 likes this.
  4. Unity_Javier

    Unity_Javier

    Unity Technologies

    Joined:
    Mar 7, 2018
    Posts:
    175