Entering play mode in my scene was pretty snappy in 5.6, but it is incredibly slow in 2017.1. It won’t start for 30-40 seconds after I hit play. Anyone else seeing this? Is there anything that usually causes this type of slowdown?
I’ve had it with other versions and although I didnt track it down properly I’m sure it was project-specific and related to some assets/code I had in the project.
You can use the Unity Profiler to find out where Unity spends those 30 seconds. I created a video that shows how to use the Profiler to do this.
And here it’s as text:
- Open Window/Profiler
- Turn on “Record” and “Profile Editor” in Profiler Window
- Press PLAY to start game
- Turn off “Record” button when game started and data is sent to Profiler
- Select slow sample in Profiler in the “CPU Usage” time-line
- Use the “Overview” list in the Profiler to see what is causing the slow-down
The “Overview” should then show what code is causing those 30 seconds delay.
I had looked at the profiler but wasn’t sure what to make of it since it was spending all of its time in “ReloadingAssmeblies”. I figured it out eventually… ScriptInspector from the asset store apparently does not play well in 2017.1 with the .NET 4.6 runtime, and was doing some sort of weird recompile every time I entered play mode. Getting rid of Script Inspector got rid of almost all the slow down.
Is the slowness only with .NET 4.6? Or does it also happen with .NET 2.0?