Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Entering Play mode takes very long time randomly.

Discussion in 'Editor & General Support' started by shb, Jul 17, 2017.

  1. shb

    shb

    Joined:
    Oct 7, 2012
    Posts:
    23
    *Entering play mode takes 1~2 minutes randomly.
    *Only happens on Windows, not OSX.
    *Making any slight changes(like toggling game object active), I have to wait a couple of minutes to entering play mode, but sometimes (very rarely) not.
    *works fine on OSX with same project.
    *Happens same with several windows machine.
    *Same issue on 5.6.1 , 5.6.2 and even on 2017
    *When I hit the play button, the CPU goes down to 0% in task manager, and stays like a couple of minutes, and then it starts to go up , and it begins to respond with play mode.
    *When it is freezing, I can check the log with the last line. "Begin MonoManager ReloadAssembly".
    *I don't think it's a awake script load, because I have same issue even with empty scene.

    When I compare logs between normal and freezing situation, the log is exactly same, but has different load time.

    *When it is normal.
    Packing sprites:
    [ 338 MB ]- Repacking is not required. Check took 47.802000 ms.
    [ 339 MB ]Reloading assemblies for play mode.
    Begin MonoManager ReloadAssembly
    Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.Locator.dll (this message is harmless)
    ....
    Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR\Editor\UnityEditor.iOS.Extensions.Xcode.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Windows.Forms.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Drawing.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Accessibility.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Runtime.Serialization.dll (this message is harmless)
    Mono: successfully reloaded assembly
    - Completed reload, in 10.297 seconds

    *When it takes a very long time (mostly)
    Packing sprites:
    [ 367 MB ]- Repacking is not required. Check took 40.773700 ms.
    [ 368 MB ]Reloading assemblies for play mode.
    Begin MonoManager ReloadAssembly
    Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.Locator.dll (this message is harmless)
    .....
    Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR\Editor\UnityEditor.iOS.Extensions.Xcode.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Windows.Forms.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Drawing.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Accessibility.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Runtime.Serialization.dll (this message is harmless)
    Mono: successfully reloaded assembly
    - Completed reload, in 90.439 seconds
    I can't see any noticible lines in ReloadAssembly logs.
    What can I do to resolve the issue?
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,940
    Have you tried profiling the editor? Turn on editor profiling, and press play.

    I've had abnormally long load times and found that it was due to some asset store package that ran a post processing function that iterated all of our assets looking for things it should care about.
     
    slimshader likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    4,990
  4. Hagen

    Hagen

    Joined:
    Aug 16, 2014
    Posts:
    31
    Did you solve it?
     
unityunity