Entering Play mode takes very long time randomly.

*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?

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.

1 Like

I recorded a “How to profile EnterPlaymode” a while ago:

Did you solve it?